[il-antlr-interest: 26516] Re: [antlr-interest] ANTLR AST vs Tree Grammar

2009-10-26 Thread Natan Vivo
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

[il-antlr-interest: 25521] Re: [antlr-interest] what's in a name?

2009-08-28 Thread Natan
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

[il-antlr-interest: 25293] Re: [antlr-interest] Sub-Lexers?

2009-08-17 Thread Natan
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

[il-antlr-interest: 24619] Re: [antlr-interest] Interpreter exceptions?

2009-07-12 Thread Natan
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

[il-antlr-interest: 24581] [antlr-interest] Interpreter exceptions?

2009-07-09 Thread Natan
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