beans 6.6.0

A parser generator library based on the Earley parser
Documentation
IfStatement ::=
  IF Expression@condition LBRACE
    StatementList@then
  RBRACE <NoElse>
  IF Expression@condition LBRACE
    StatementList@then
  RBRACE ELSE LBRACE
    StatementList@else
  RBRACE <Else>;

WhileStatement ::=
  WHILE Expression@condition LBRACE
    StatementList@do
  RBRACE <>;

Assignment ::=
  ID.0@key EQUALS Expression@value <>;

BuiltinType ::=
  INT.0@value <Int>
  STRING.0@value <String>
  ID.0@value <Id>
  TRUE <True>
  FALSE <False>;

Atom ::=
  BuiltinType@this <Builtin>
  LPAR Expression@this RPAR <Through>;

Expression ::=
  Expression@left PLUS Expression@right <Add>
  Expression@left ASTERISK Expression@right <Mul>
  Atom@this <Through>;

Statement ::=
  Assignment@this SEMICOLON <Assign>
  IfStatement@this <If>
  WhileStatement@this <While>;

@StatementList ::=
  StatementList@left Statement@right <Concat>
  Statement@this <Through>;