Module: RpRb
- Defined in:
- lib/expr.rb,
lib/rprb.rb
Defined Under Namespace
Constant Summary collapse
- Grammar =
Packrat::Grammar.new do start_symbol :Stream S = hidden(/\s*/) FS = hidden(/\s\s*/) prod :Stream, [mult(:Expression), ast(:Stream)] prod :StringLiteral, [/"(?:[^"]|\\")*"/, lift(0)] prod :Block, [hidden('{'), S, :Stream, S, hidden('}'), ast(:Block)] prod :Atom, [any(:StringLiteral, /[^{} \t]+/), lift(0)] rule :Expression, [S, any(:Block, :Atom), S, ast(:Expression)] end
- Parser =
Grammar.interpreting_parser