Parser

 

For a high-level explanation how the parser works, see parsing.

 

 

Since version 0.4, the parser is sufficiently powerful to parse
everything needed for our language.
It is very easy to edit the syntax to recognize and using the parser
is very easy as well.

The question is now wether we go on to show off the parser or leave it
as it is and continue with the core of the language itself. If you
have read the planning or internals sections, you know that one aim is
to bootstrap a compiler as soon as possible. Therefore, everything has
to be rewritten in Arplan once the core of the language can be
executed. Continuing the parser until milestone 0.8 would enable us to
make a *really* nice web demo: parsing with custom syntax set at
runtime. On the other hand, this will take time (one week per
milestone approximately) and thus delays work on the core of the
language itself. Lastly, it is meant to be rewritten in Arplan once it
becomes possible.

Considering all this, my choice has been to halt work on the parser as
it is enough for our needs. It is a bit a pitty for the demo, since
putting one month of effort would provide a great show stopper. But
that's life, one has to make choices, Arplan was chosen over
marketing.

 

 

Done

 

  • v 0.1
    • throw away prototype
    • uses parser combinators
  • v 0.2
    • improved and cleaner version of v 0.1
    • parses the language core
  • Change of direction
    • whish for more flexibility: easier to declare/change grammar
    • tokenizer becomes too complex and includes parts of parsing
    • goal: give a file describing the syntax and you obtain a parsing function parsing it ...at runtime!
  • v 0.3
    • based on a declarative internal representation of syntactic rules
    • scannerless
    • easy to modify parsed syntax
  • v 0.4
    • support for body change of syntax
    • better separation of global parsing and line parsing

 

 

Planned

 

  • v 0.5
    • support for AST transforms
    • ability to fully support syntax files
  • v 0.6
    • cleanup + improvements
    • full parsing
    • web demo
  • v 0.7
    • left recursive rules support
    • stream grammars
  • v 0.8
    • grammar corectness verification:
      • no missing rules
      • no cyclic rules
      • unambiguous grammar
      • ...