Accessing Symbol objects directly in CUP actions?

Denis Washington <dwashington@gmx.net>
19 Jun 2006 09:34:05 -0400

          From comp.compilers

Related articles
Accessing Symbol objects directly in CUP actions? dwashington@gmx.net (Denis Washington) (2006-06-19)
| List of all articles for this month |
From: Denis Washington <dwashington@gmx.net>
Newsgroups: comp.compilers
Date: 19 Jun 2006 09:34:05 -0400
Organization: Compilers Central
Keywords: Java, question
Posted-Date: 19 Jun 2006 09:34:05 EDT

Hi,


I'm writing a grammar for a programming language I'm developing as
hobby project (probably gonna be open-source), using CUP and JFlex for
parser/scanner generation. With the SymbolFactory functionality of
CUP, I set the scanner grammar up to use ComplexSymbolFactory, which
stores location information in a better format than the standard
Symbol class.


Now my question: how can I access those Symbols in the CUP grammar? I
know you can label right-hand side productions and terminals to access
the values of them in actions, but is can you also access the Symbols
themselves?


Post a followup to this message

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