Hi Alexander!

1. Going to Antlr3 for classfile[.tree].g has too much obstacles I couldn't 
handle for the forthcoming release. I solved lexing of binary files (see 
below), but didn't manage to port the AST building/parsing from Antlr2 to 
Antlr3. So I had to go back to the Antlr2 grammars for classfile import.

2. Andreas is right that it never worked completely. There was a big problem 
with the lexer that Antr3 generates: the interface between lexer and parser 
requires a character based token stream, so lexing a byte stream was 
technically not possible. Luckily, the lexer is trivial: one byte is one token 
(2 and 4 byte values are handled by the parser). So I let Antlr just generate 
the parser and made an optimized hand-coded lexer: works like a charm, I'd be 
happy with it! After this, there's *only* the problem of tree 
construction/parsing, which I could not migrate to Antlr3, but I'm sure that 
someone else would succeed. (Avoiding ASTs by using our own data structures 
would be an option, but avoiding Antlr at all would be an option, too ;-) )

3. The Antlr3 migration for classfile import is currently stopped. If you want 
to investigate into the Antlr3 issue, then I can set up a branch with my 
achievements. I planned to do so anyway.

> I suppose we should get antlr 3 sources and make them work with binary file.

I got the sources to be able to debug, but not to modify them. Binary lexing is 
solved, so there is no need to change the Antlr sources! (I'd have problems 
with that anyway, you know, licensing etc...)

Regards,
Thomas

-------- Original-Nachricht --------
> Datum: Tue, 10 Feb 2009 14:59:17 +0100
> Von: Andreas Rueckert <[email protected]>
> An: [email protected]
> Betreff: Re: [argouml-dev] classfile.g for antlr-3.1.1

> Hi!
> 
> -------- Original-Nachricht --------
> > Datum: Tue, 10 Feb 2009 04:44:18 -0800 (PST)
> > Von: Alexander Lepekhine <[email protected]>
> > An: [email protected]
> > Betreff: [argouml-dev] classfile.g for antlr-3.1.1
> 
> > Hi Thomas,
> > could you tell me 
> > 1. what was the reason for going back to classfile.g for antlr-2.7.7
> from
> > 3.1.1?
> 
> Binary lexing didn't work in Antlr 3.
> 
> > 2. was the preliminary version of classfile.g for antlr-3.1.1. work?
> 
> It never worked completely...
> 
> > 3. will we change classfile.g to the antlr-3.1.1 version?
> 
> AFAIK (Thomas might know better), there's no real example of binary
> parsing for Antlr 3.
> Seems like noone pays attention to this in the Antlr project.
> 
> Ciao,
> Andreas
> 
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:
> http://www.gmx.net/de/go/multimessenger01
> 
> ------------------------------------------------------
> http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1134266
> 
> To unsubscribe from this discussion, e-mail:
> [[email protected]].

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger01

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1138779

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to