[antlr-interest] CommonTree vs CommonAST
Martijn Reuvers
martijn.reuvers at gmail.com
Sun Sep 25 04:07:03 PDT 2011
Hey Ter,
New name sounds good to me to distinguish. Yes it will break things,
but well if you go to v4 that can be expected anyway - as it's a major
release. =)
Martijn
On Sat, Sep 24, 2011 at 6:36 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
> Hi. I'm working on the v4 runtime and, since I have introduced a formal notion of the parse tree, some naming changes seem reasonable. I created interface Tree, which is generic. Then I introduced ParseTree. "Tree" is such a generic term and might conflict with ParseTree I've changed the abstract syntax tree stuff back to AST (like in v2). Here is the complete hierarchy:
>
>
>
>
> So CommonTree in v3 becomes CommonAST in v4. I don't like gratuitous breaking changes. I could leave an alias for CommonTree (subclass CommonAST), but it would not be a perfect replacement due to type compatibility.
>
> Q: is it better to leave CommonTree as CommonTree for backward compatibility or is it better to use CommonAST in order to make it more clear we are distinguishing between parse trees and abstract syntax tree?
>
> A name change also requires changes in the tree adapter stuff... that has to become ASTAdaptor, CommonASTAdaptor... more breaking changes at the type name level...grrr...
>
> Thanks,
> Ter
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
More information about the antlr-interest
mailing list