rubyx/lib/parser
2014-05-10 21:41:46 +03:00
..
basic_types.rb slight shuffling 2014-05-10 12:54:31 +03:00
conditional.rb start to add while loop 2014-05-10 19:02:51 +03:00
copied_parser.rb created own directory for parser 2014-04-27 15:38:07 +03:00
crystal.rb add a repeat to the root parser rule (need to test the root more) 2014-05-10 11:18:39 +03:00
expression.rb adds basic math operators, thanks to kasper associative and prioritised 2014-05-10 21:41:46 +03:00
function_call.rb splitting the parser up more 2014-05-10 11:14:34 +03:00
function_definition.rb splitting the parser up more 2014-05-10 11:14:34 +03:00
keywords.rb start to add while loop 2014-05-10 19:02:51 +03:00
operators.rb add keyword and operators as seperate parser modules 2014-04-27 21:12:24 +03:00
README.markdown created own directory for parser 2014-04-27 15:38:07 +03:00
tokens.rb adds basic math operators, thanks to kasper associative and prioritised 2014-05-10 21:41:46 +03:00
transform.rb adds basic math operators, thanks to kasper associative and prioritised 2014-05-10 21:41:46 +03:00

Parser

This includes the parser and generated ast.

Parslet is really great in that it:

  • does not generate code but instean gives a clean dsl to define a grammar
  • uses ruby modules so one can split the grammars up
  • has a seperate tranform stage to generate an ast layer

Especially the last point is great. Since it is seperate it does not clutter up the actual grammar. And it can generate a layer that has no links to the actual parser anymore, thus saving/automating a complete tranformation process.