Sha256: d1b182cf5611214988a90e5b5d86c52976d4fad1fbb2690101fba5c4d445d3df
Contents?: true
Size: 645 Bytes
Versions: 7
Compression:
Stored size: 645 Bytes
Contents
{ "comment": "Grammar showing precedence operators and semantic actions.", "lex": { "rules": [ ["\\s+", "/* skip whitespace */"], ["[0-9]+", "return 'NAT';"], ["\\+", "return '+';"], ["\\*", "return '*';"], ["$", "return 'EOF';"] ] }, "tokens": "NAT + * EOF", "operators": [ ["left", "+"], ["left", "*"] ], "bnf": { "S" :[[ "e EOF", "return $1;" ]], "e" :[[ "e + e", "$$ = [$1,'+', $3];" ], [ "e * e", "$$ = [$1, '*', $3];" ], [ "NAT", "$$ = parseInt(yytext);" ]] } }
Version data entries
7 entries across 7 versions & 1 rubygems