Graham-Glannville code generators

Ralph Boland <>
Wed, 5 May 2010 11:20:39 -0700 (PDT)

          From comp.compilers

Related articles
Graham-Glannville code generators (Ralph Boland) (2010-05-05)
Re: Graham-Glannville code generators (2010-05-09)
| List of all articles for this month |

From: Ralph Boland <>
Newsgroups: comp.compilers
Date: Wed, 5 May 2010 11:20:39 -0700 (PDT)
Organization: Compilers Central
Keywords: code, question
Posted-Date: 09 May 2010 12:05:33 EDT

I am developing a parser generator tool that can handle fairly
difficult grammars and can sometimes deal with ambiguous grammars. I
am interested in finding applications outside of parsing programming
languages and natural languages. I have read a little bit about
Graham-Glannville code generators and am wondering to what degree I
can use my parsing techniques to deal with code generation. I have
two questions:

1) Is Graham-Glannville style code generation still in active use/
development or is it passe? Modern references would be a help here
though I have a few that I have found on the Internet (if 2000 is
considered modern). Most of what I have read is from the 80's.

Once my parser generator is complete I will start a project on
generating code targeting virtual machines such as JVM and LLVM. So
my second question is:

2) Where does Graham-Glannville style code generation fit in when
generating virtual machine code? Is it useful? Is is easier? Are
there reasons why it makes more or less sense than for generating real
machine code?

2b) (O.k. so I can't count to 3.)
Let's say I now want translate virtual machine code into real
machine code. I assume that this is where Graham-Glannville would
normally be used. Is there anything about Graham-Glannville style
code generation that is going to be different or of interest in this

In your response keep in mind that others may not know as much about
Graham-Glannville style code generation as I do (which isn't a lot).


Ralph Boland

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.