[antlr-interest] DFA's encoded directly in java bytecodes

Robert Colquhoun rjc at trump.net.au
Tue Oct 26 13:46:45 PDT 2004


Hello,

At 06:13 AM 26/10/2004, Terence Parr wrote:
>As I say though I wondered about breaks at first, but then decided that
>bytecodes were the only general way to get the gotos.  I do have a nice
>little assembler and class file writer now for ANTLR that, while not
>completely general, it's damn small.  Assembler and .class file writer
>are each about 600 lines.  Could be useful for users of antlr as well
>as the tool itself.

With all the goto'ing I was just wondering if the assembler you have done 
above implements the bytecode rule "all approaches to a single point must 
have the same stack"

This was quite hard for me to do, i have a java bytecode generator(about 
2500 lines ;-) that i was going to use to produce a bytecode tree walker to 
compile antlr grammars starting from BNF without the java source 
intermediate step.

I was stuck on action code and how to do semantic actions, its easy to do 
as separate actions but hard to do inline.

- Robert



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list