tunnelvisionlabs / antlr4

The highly-optimized fork of ANTLR 4 (see README)
Other
73 stars 13 forks source link

Create a framework for transformations using immutable trees #4

Open sharwell opened 9 years ago

sharwell commented 9 years ago

By supporting immutable trees as output from the parser, it would be easier to create a generalized framework for concrete syntax transformations in the trees. The factory described in #1 would simplify the creation of new trees during the transformation process.

These trees would also simplify the implementation of an incremental lexer and/or parser, which is capable of efficiently creating a complete new parse tree following changes to a subset of the input sequence.

The .NET Compiler Platform is using a similar technique with great success.