public class DefaultSymbolFactory extends Object implements SymbolFactory
| Constructor and Description |
|---|
DefaultSymbolFactory()
Deprecated.
as of CUP v11a
replaced by the new java_cup.runtime.ComplexSymbolFactory
|
| Modifier and Type | Method and Description |
|---|---|
Symbol |
newSymbol(String name,
int id)
newSymbol
creates a basic symbol;
used frequently for terminal symbols, like keywords
|
Symbol |
newSymbol(String name,
int id,
int left,
int right) |
Symbol |
newSymbol(String name,
int id,
int left,
int right,
Object value) |
Symbol |
newSymbol(String name,
int id,
Object value)
newSymbol
creates a basic symbol with an attached value;
used frequently for terminal symbols like identifiers
|
Symbol |
newSymbol(String name,
int id,
Symbol left,
Symbol right)
newSymbol
creates a symbol, grouping other symbols with left/right locations;
used frequently by the parser to implement non-terminal symbols
|
Symbol |
newSymbol(String name,
int id,
Symbol left,
Symbol right,
Object value)
newSymbol
creates a symbol with a value, grouping other symbols with left/right locations;
used frequently by the parser to implement non-terminal symbols
|
Symbol |
startSymbol(String name,
int id,
int state)
newSymbol
creates the start symbol
|
public DefaultSymbolFactory()
public Symbol newSymbol(String name, int id, Symbol left, Symbol right, Object value)
SymbolFactorynewSymbol in interface SymbolFactoryname - Textual name for the Symbol for verbose error messagesid - enum value associated with this symbol, generated by cup via sym.javaleft - symbol, to take the left location fromright - symbol, to take the right location fromvalue - value, attached to this symbolpublic Symbol newSymbol(String name, int id, Symbol left, Symbol right)
SymbolFactorynewSymbol in interface SymbolFactoryname - Textual name for the Symbol for verbose error messagesid - enum value associated with this symbol, generated by cup via sym.javaleft - symbol, to take the left location fromright - symbol, to take the right location frompublic Symbol startSymbol(String name, int id, int state)
SymbolFactorystartSymbol in interface SymbolFactoryname - Textual name for the Symbol for verbose error messagesid - enum value associated with this symbol, generated by cup via sym.javapublic Symbol newSymbol(String name, int id)
SymbolFactorynewSymbol in interface SymbolFactoryname - Textual name for the Symbol for verbose error messagesid - enum value associated with this symbol, generated by cup via sym.javapublic Symbol newSymbol(String name, int id, Object value)
SymbolFactorynewSymbol in interface SymbolFactoryname - Textual name for the Symbol for verbose error messagesid - enum value associated with this symbol, generated by cup via sym.javavalue - value, attached to this symbolCopyright © 2015. All rights reserved.