aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-12 06:41:27 +1000
committerDavid Walter Seikel2012-01-12 06:41:27 +1000
commit5ef64ea66f87c4be3488262ade7b9e2dc0c857d6 (patch)
tree68ee54a870140c755a19ca3e3efb54e192dfb2d6 /LuaSL
parentAllow output to a file, and compare the output with the input. (diff)
downloadSledjHamr-5ef64ea66f87c4be3488262ade7b9e2dc0c857d6.zip
SledjHamr-5ef64ea66f87c4be3488262ade7b9e2dc0c857d6.tar.gz
SledjHamr-5ef64ea66f87c4be3488262ade7b9e2dc0c857d6.tar.bz2
SledjHamr-5ef64ea66f87c4be3488262ade7b9e2dc0c857d6.tar.xz
Space reduction.
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y16
1 files changed, 5 insertions, 11 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index 49d2fe1..814f2b5 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -2,13 +2,13 @@
2#include "LuaSL_LSL_tree.h" 2#include "LuaSL_LSL_tree.h"
3} 3}
4 4
5%extra_argument { LuaSL_yyparseParam *param } 5%extra_argument {LuaSL_yyparseParam *param}
6 6
7%stack_size 256 7%stack_size 256
8 8
9%token_type {LSL_Leaf *} 9%token_type {LSL_Leaf *}
10%default_type {LSL_Leaf *} 10%default_type {LSL_Leaf *}
11%token_destructor { burnLeaf($$); } 11%token_destructor {burnLeaf($$);}
12 12
13 13
14program ::= script LSL_SCRIPT(A). { A->left = param->ast; param->ast = A; } // Lemon does not like the start symbol to be on the RHS, so give it a dummy one. 14program ::= script LSL_SCRIPT(A). { A->left = param->ast; param->ast = A; } // Lemon does not like the start symbol to be on the RHS, so give it a dummy one.
@@ -82,17 +82,11 @@ script ::= statement(A). { A->left = param->ast; param->ast = A; }
82 82
83%parse_accept {printf("Parsing complete.\n");} 83%parse_accept {printf("Parsing complete.\n");}
84 84
85%parse_failure { 85%parse_failure {fprintf(stderr,"Giving up. Parser is hopelessly lost...\n");}
86 fprintf(stderr,"Giving up. Parser is hopelessly lost...\n");
87}
88 86
89%stack_overflow { 87%stack_overflow {fprintf(stderr,"Giving up. Parser stack overflow!\n");}
90 fprintf(stderr,"Giving up. Parser stack overflow!\n");
91}
92 88
93%syntax_error { 89%syntax_error {fprintf(stderr,"Syntax error!\n");}
94 fprintf(stderr,"Syntax error!\n");
95}
96 90
97/* Undocumented shit that might be useful later. Pffft 91/* Undocumented shit that might be useful later. Pffft
98 92