Fixed lemon grammar to use correct tokens.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 28 Feb 2009 04:31:52 -0500
changeset 707 85b648e14089
parent 706 01a92f30b84f
child 708 d29c193900b0
Fixed lemon grammar to use correct tokens. Now I can parse this basic C (not HLSL) program: void main(void) { printf("hello, world!\n"); printf("hello, world 2!\n"); }
mojoshader_parser_hlsl.lemon
--- a/mojoshader_parser_hlsl.lemon	Sat Feb 28 04:30:56 2009 -0500
+++ b/mojoshader_parser_hlsl.lemon	Sat Feb 28 04:31:52 2009 -0500
@@ -76,15 +76,15 @@
 postfix_expr ::= postfix_expr LPAREN argument_expr_list RPAREN.
 postfix_expr ::= postfix_expr DOT identifier.
 postfix_expr ::= postfix_expr PTR_OP identifier.
-postfix_expr ::= postfix_expr INC_OP.
-postfix_expr ::= postfix_expr DEC_OP.
+postfix_expr ::= postfix_expr PLUSPLUS.
+postfix_expr ::= postfix_expr MINUSMINUS.
 
 argument_expr_list ::= assignment_expr.
 argument_expr_list ::= argument_expr_list COMMA assignment_expr.
 
 unary_expr ::= postfix_expr.
-unary_expr ::= INC_OP unary_expr.
-unary_expr ::= DEC_OP unary_expr.
+unary_expr ::= PLUSPLUS unary_expr.
+unary_expr ::= MINUSMINUS unary_expr.
 unary_expr ::= unary_operator cast_expr.
 unary_expr ::= SIZEOF unary_expr.
 unary_expr ::= SIZEOF LPAREN type_name RPAREN.