From 8374ccb66ff13074a3f5938da1e22a48921c5328 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 19 Jan 2007 10:02:58 -0700 Subject: [PATCH] change while-loop to create new scope for loop body, per spec --- src/mesa/shader/slang/library/slang_shader.syn | 4 ++-- src/mesa/shader/slang/library/slang_shader_syn.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn index ee0254f1b80..bfa6793f067 100644 --- a/src/mesa/shader/slang/library/slang_shader.syn +++ b/src/mesa/shader/slang/library/slang_shader.syn @@ -1096,7 +1096,7 @@ condition_3 expression .and .true .emit OP_END; /* - ::= "while" "(" ")" + ::= "while" "(" ")" | "do" "while" "(" ")" ";" | "for" "(" ")" @@ -1105,7 +1105,7 @@ iteration_statement iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3; iteration_statement_1 "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and - rparen .error RPAREN_EXPECTED .and statement_no_new_scope; + rparen .error RPAREN_EXPECTED .and statement; iteration_statement_2 "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon; diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h index abfb6cd42a8..58cf1b13904 100644 --- a/src/mesa/shader/slang/library/slang_shader_syn.h +++ b/src/mesa/shader/slang/library/slang_shader_syn.h @@ -533,7 +533,7 @@ " iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n" "iteration_statement_1\n" " \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n" -" rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n" +" rparen .error RPAREN_EXPECTED .and statement;\n" "iteration_statement_2\n" " \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n" " expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n" -- 2.30.2