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 f37b2e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions lib/lrama/new_parser.rb

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

3 changes: 1 addition & 2 deletions 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 Expand Up @@ -122,7 +122,6 @@ end
def initialize(text)
@text = text
@lineno = []
@yydebug = true
@column = []
end

Expand Down

0 comments on commit f37b2e0

Please sign in to comment.