diff options
author | David Walter Seikel | 2012-01-09 08:34:27 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-09 08:34:27 +1000 |
commit | db4c67e1c048fef9af24bfcb9c41052982947efb (patch) | |
tree | e9e7213e2ed506b2bf65729e4286409d3b824c1c /LuaSL/src | |
parent | Turn btyacc debugging back on, it's fine now. (diff) | |
download | SledjHamr-db4c67e1c048fef9af24bfcb9c41052982947efb.zip SledjHamr-db4c67e1c048fef9af24bfcb9c41052982947efb.tar.gz SledjHamr-db4c67e1c048fef9af24bfcb9c41052982947efb.tar.bz2 SledjHamr-db4c67e1c048fef9af24bfcb9c41052982947efb.tar.xz |
Implement script, and add YYVALID for statement to help with recovering from errors.
Diffstat (limited to 'LuaSL/src')
-rw-r--r-- | LuaSL/src/LuaSL_yaccer.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_yaccer.y b/LuaSL/src/LuaSL_yaccer.y index b9721f8..35447d1 100644 --- a/LuaSL/src/LuaSL_yaccer.y +++ b/LuaSL/src/LuaSL_yaccer.y | |||
@@ -45,6 +45,8 @@ | |||
45 | %type <statementValue> statement | 45 | %type <statementValue> statement |
46 | %nonassoc LSL_STATEMENT | 46 | %nonassoc LSL_STATEMENT |
47 | 47 | ||
48 | %type <scriptValue> script | ||
49 | |||
48 | %% | 50 | %% |
49 | 51 | ||
50 | input : | 52 | input : |
@@ -84,8 +86,11 @@ expr : | |||
84 | ; | 86 | ; |
85 | 87 | ||
86 | statement : | 88 | statement : |
87 | expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); } | 89 | expr LSL_STATEMENT { $$ = createStatement(LSL_EXPRESSION, $1); YYVALID; } |
88 | ; | 90 | ; |
89 | 91 | ||
92 | script : | ||
93 | script LSL_STATEMENT statement | ||
94 | |||
90 | %% | 95 | %% |
91 | 96 | ||