Grammars (III)
- Like classes, grammars can inherit, be provided by modules, etc.
- By default, using a grammar to parse returns an AST (abstract syntax tree)
- However, you can also pass an actions object to the parser:
-
MyGrammar.parse($string, :actions($action-object))
- Actions with the same name as rules are called when the rule succeeds
« first
< prev
(20 / 41)
next >
last »