Method: Racc::Parser#next_token
- Defined in:
- lib/racc/parser.rb
#next_token ⇒ Object
The method to fetch next token. If you use #do_parse method, you must implement #next_token.
The format of return value is [TOKEN_SYMBOL, VALUE]. token-symbol is represented by Ruby’s symbol by default, e.g. :IDENT for ‘IDENT’. “;” (String) for ‘;’.
The final symbol (End of file) must be false.
275 276 277 |
# File 'lib/racc/parser.rb', line 275 def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" end |