kaby76 / Trash

Toolkit for grammars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree/token stream/char stream representation in Antlr is extremely inefficient for editing; need to change

kaby76 opened this issue · comments

After implementing insert, delete, and replace tree operations that also update the token stream and char stream, it looks like the implementation is too slow to use.

I'm thinking the best way to implement the token stream and char streams in the tree is to just compute the frontier from the tree.

  • Remove all tree copying from IParseTree into AntlrNode, work directly with a DOM which implements Antlr's trees in a very simplified form.
  • Trees passed in ParsingResultsSet are DOMs.
  • Convert once to a DOM in trparse.
  • Skip charstreams in ParsingResultsSet.
  • Skip token streams in ParsingResultsSet. Tokens are directly attached as child to tree in ParsingResultSet.
  • Set version 0.19.0 for all tools. Completely incompatible with earlier versions.