public class ComplexSymbolFactory extends java.lang.Object implements SymbolFactory
Modifier and Type | Class and Description |
---|---|
static class |
ComplexSymbolFactory.ComplexSymbol
ComplexSymbol with detailed Location Informations and a Name
|
static class |
ComplexSymbolFactory.Location |
Constructor and Description |
---|
ComplexSymbolFactory() |
Modifier and Type | Method and Description |
---|---|
Symbol |
newSymbol(java.lang.String name,
int id)
newSymbol
creates a basic symbol;
used frequently for terminal symbols, like keywords
|
Symbol |
newSymbol(java.lang.String name,
int id,
ComplexSymbolFactory.Location left,
ComplexSymbolFactory.Location right)
newSymbol
creates a complex symbol with Location objects for left and right boundaries;
this is used for terminals without values!
|
Symbol |
newSymbol(java.lang.String name,
int id,
ComplexSymbolFactory.Location left,
ComplexSymbolFactory.Location right,
java.lang.Object value)
newSymbol
creates a complex symbol with Location objects for left and right boundaries;
this is used for terminals with values!
|
Symbol |
newSymbol(java.lang.String name,
int id,
java.lang.Object value)
newSymbol
creates a basic symbol with an attached value;
used frequently for terminal symbols like identifiers
|
Symbol |
newSymbol(java.lang.String name,
int id,
Symbol left,
java.lang.Object value)
newSymbol
creates a symbol for an empty production, taking its location from the Symbol on the left
|
Symbol |
newSymbol(java.lang.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(java.lang.String name,
int id,
Symbol left,
Symbol right,
java.lang.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(java.lang.String name,
int id,
int state)
newSymbol
creates the start symbol
|
public Symbol newSymbol(java.lang.String name, int id, ComplexSymbolFactory.Location left, ComplexSymbolFactory.Location right, java.lang.Object value)
public Symbol newSymbol(java.lang.String name, int id, ComplexSymbolFactory.Location left, ComplexSymbolFactory.Location right)
public Symbol newSymbol(java.lang.String name, int id, Symbol left, java.lang.Object value)
SymbolFactory
newSymbol
in interface SymbolFactory
name
- 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 fromvalue
- value, attached to this symbolpublic Symbol newSymbol(java.lang.String name, int id, Symbol left, Symbol right, java.lang.Object value)
SymbolFactory
newSymbol
in interface SymbolFactory
name
- 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(java.lang.String name, int id, Symbol left, Symbol right)
SymbolFactory
newSymbol
in interface SymbolFactory
name
- 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 newSymbol(java.lang.String name, int id)
SymbolFactory
newSymbol
in interface SymbolFactory
name
- Textual name for the Symbol for verbose error messagesid
- enum value associated with this symbol, generated by cup via sym.javapublic Symbol newSymbol(java.lang.String name, int id, java.lang.Object value)
SymbolFactory
newSymbol
in interface SymbolFactory
name
- 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 symbolpublic Symbol startSymbol(java.lang.String name, int id, int state)
SymbolFactory
startSymbol
in interface SymbolFactory
name
- Textual name for the Symbol for verbose error messagesid
- enum value associated with this symbol, generated by cup via sym.java