Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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");
    }
  • Loading branch information
icculus committed Feb 28, 2009
1 parent 550ca78 commit 921ad12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mojoshader_parser_hlsl.lemon
Expand Up @@ -76,15 +76,15 @@ postfix_expr ::= postfix_expr LPAREN RPAREN.
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.
Expand Down

0 comments on commit 921ad12

Please sign in to comment.