Hi Tommy,
Tree Grammars and ASTs are not competing in the same space. AST is just the
tree of nodes that represent your input. Tree Grammar is a grammar made
specifically to parse those ASTs.
You usually use them to walk through an AST you already built, and do things
with it. Think about the mu
Terence Parr wrote:
> The confusion is that the current title can be seen as about lang
> design. We could do Lang Impl Patterns, but Kent Beck has a Impl
> Patterns book now that is totally different concept.
>
> Publisher wants DSL in there somewhere. Any ideas about title/subtitle?
>
I
C. Mundi wrote:
> What I'm thinking is a lexer which finds the clauses followed by a
> parser which does a trivial rewrite which embeds actions to invoke
> specialized lexers for each clause type. All of the specialized
> levers target a single AST which is handled by a unified parser.
>
I onc
Gavin Lambert wrote:
> I've usually found the interpreter to be unreliable even without
> getting into actions and predicates. It's usually best to just
> pretend it doesn't exist, and use a combination of the debugger, unit
> tests, and the main code instead.
I wasn't sure if this was someth
Hi,
I'm still learning AntLr, but something is bothering me, maybe someone
here can explain this.
Given a very simple test grammar like:
prog
:STRING;
STRING
:'"' ( '\"' | ~('"') )* '"';
I debug using "test" as input, and it works fine and shows me a tree
like: root -> prog