mojoshader_parser_hlsl.lemon
changeset 848 8ff6c5d37d33
parent 846 10eb8be2c919
child 854 65e06097e450
equal deleted inserted replaced
847:cb7997b93a1a 848:8ff6c5d37d33
    34 #endif
    34 #endif
    35 }
    35 }
    36 
    36 
    37 %syntax_error {
    37 %syntax_error {
    38     // !!! FIXME: make this a proper fail() function.
    38     // !!! FIXME: make this a proper fail() function.
    39     ctx->isfail = 1;
    39     fail(ctx, "Syntax error");
    40     fprintf(stderr,"Syntax error\n");
       
    41 }
    40 }
    42 
    41 
    43 %parse_failure {
    42 %parse_failure {
    44     // !!! FIXME: make this a proper fail() function.
    43     // !!! FIXME: make this a proper fail() function.
    45     ctx->isfail = 1;
    44     fail(ctx, "Giving up. Parser is hopelessly lost...");
    46     fprintf(stderr,"Giving up.  Parser is hopelessly lost...\n");
       
    47 }
    45 }
    48 
    46 
    49 %stack_overflow {
    47 %stack_overflow {
    50     // !!! FIXME: make this a proper fail() function.
    48     // !!! FIXME: make this a proper fail() function.
    51     ctx->isfail = 1;
    49     fail(ctx, "Giving up. Parser stack overflow");
    52     fprintf(stderr,"Giving up.  Parser stack overflow\n");
       
    53 }
    50 }
    54 
    51 
    55 // operator precedence (matches C spec)...
    52 // operator precedence (matches C spec)...
    56 
    53 
    57 %left COMMA.
    54 %left COMMA.