Skip to content

Commit

Permalink
Add lex_param
Browse files Browse the repository at this point in the history
  • Loading branch information
junk0612 committed Oct 6, 2023
1 parent a4d32d2 commit deb0500
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/lrama/new_parser.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rule
| "%define" variable value
| "%require" STRING
| "%param" params
| "%lex-param" params
| "%lex-param" params { val[1].each {|token| token.references = []; @grammar.lex_param = @grammar.build_code(:lex_param, token).token_code.s_value} }
| "%parse-param" params { val[1].each {|token| token.references = []; @grammar.parse_param = @grammar.build_code(:parse_param, token).token_code.s_value} }
| "%initial-action" "{" {@lexer.status = :c_declaration; @lexer.end_symbol = '}'} C_DECLARATION {@lexer.status = :initial; @lexer.end_symbol = nil} "}"
| ";"
Expand Down

0 comments on commit deb0500

Please sign in to comment.