Parser project:

0) Fix re-generation of grammar to include EOF item.
1) add regexp literal matching
2) Constant expressions
3) Add line reconstruction parse-time code to avoid string quote matching in parsed comments
4) Create regression test suite
5) put C parser back in place - eliminate language-specific tweaks from shared code
6) integrate symbol tables
7) Either remove numbering for BIPs *or* ensure that every reference to a BIP in user code
   uses the user-supplied BIP number, not the internal compressed-range BIP code.
   This will allow cut&pasting of BIP code from different parsers to share code and not
   force a grand renumbering every time you import the definition of a real constant from
   a different parser :-/
7) document the parser! - write a publishable paper (or book) and manual
8) Write SOAP - with option for outputting common subset (ie to be compiled with Imp2021)
  8a) Handle lines that fail to parse
  8b) Add flags for various mutually-exclusive choices
  8c) Detect language variant automatically if possible
  8d) 
9) Write Imp To C translator
infinite) Move Imp77 pass1 to this parser, ie generate compatible ICode.


AST to CFG converter? (ie serialise AST)
  - add fixed fields to AST:
    * pointers to start/end of text blocks similar to c[] array for contiguous c[] tokens,
      and some alternative (if needed) for non-contiguous sequences
    * link to next entry in CFG


Imp2021 project:

1) Modify Imp2021's takeon to allow C output instead of Imp.


Document:

Source -> character stream

character stream -> token stream {aka line reconstruction or lexer}

token stream -> concrete syntax tree (CST) {aka parse tree} {parser may feed back info to control lexer}

CST -> abstract syntax tree (AST)
   CST -> source

check/annotate(AST) -> AST {scopes, name tables}

optimise(AST) -> AST {eg folding const expressions, common subexpression elimination, etc etc. Many etc's.}

SSA(AST) -> AST  {perform static single assignment, create Phi nodes}

AST -> control flow graph (CFG)
   AST -> source
   modify(AST) -> modified source

dataflow analysis(CFG) -> CFG {including determining basic blocks}

CFG -> IR {intermediate representation, eg 3-address code}

IR -> assembly code

assembly code -> partial binary code

linker(partial binary code) -> object code

linking loader(object code) -> execute code in memory {may dynamically load more code while executing}

