Package java_cup.runtime
Class ComplexSymbolFactory
java.lang.Object
java_cup.runtime.ComplexSymbolFactory
- All Implemented Interfaces:
SymbolFactory
Default Implementation for SymbolFactory, creates
plain old Symbols
- Version:
- last updated 27-03-2006
- Author:
- Michael Petter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classComplexSymbol with detailed Location Informations and a Namestatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewSymbol creates a basic symbol; used frequently for terminal symbols, like keywordsnewSymbol(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!newSymbol(String name, int id, ComplexSymbolFactory.Location left, ComplexSymbolFactory.Location right, Object value) newSymbol creates a complex symbol with Location objects for left and right boundaries; this is used for terminals with values!newSymbol creates a symbol, grouping other symbols with left/right locations; used frequently by the parser to implement non-terminal symbolsnewSymbol creates a symbol with a value, grouping other symbols with left/right locations; used frequently by the parser to implement non-terminal symbolsnewSymbol creates a symbol for an empty production, taking its location from the Symbol on the leftnewSymbol creates a basic symbol with an attached value; used frequently for terminal symbols like identifiersstartSymbol(String name, int id, int state) newSymbol creates the start symbol
-
Constructor Details
-
ComplexSymbolFactory
public ComplexSymbolFactory()
-
-
Method Details
-
newSymbol
public Symbol newSymbol(String name, int id, ComplexSymbolFactory.Location left, ComplexSymbolFactory.Location right, Object value) newSymbol creates a complex symbol with Location objects for left and right boundaries; this is used for terminals with values! -
newSymbol
public Symbol newSymbol(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! -
newSymbol
Description copied from interface:SymbolFactorynewSymbol creates a symbol for an empty production, taking its location from the Symbol on the left- Specified by:
newSymbolin interfaceSymbolFactory- Parameters:
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 symbol
-
newSymbol
Description copied from interface:SymbolFactorynewSymbol creates a symbol with a value, grouping other symbols with left/right locations; used frequently by the parser to implement non-terminal symbols- Specified by:
newSymbolin interfaceSymbolFactory- Parameters:
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 symbol
-
newSymbol
Description copied from interface:SymbolFactorynewSymbol creates a symbol, grouping other symbols with left/right locations; used frequently by the parser to implement non-terminal symbols- Specified by:
newSymbolin interfaceSymbolFactory- Parameters:
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 from
-
newSymbol
Description copied from interface:SymbolFactorynewSymbol creates a basic symbol; used frequently for terminal symbols, like keywords- Specified by:
newSymbolin interfaceSymbolFactory- Parameters:
name- Textual name for the Symbol for verbose error messagesid- enum value associated with this symbol, generated by cup via sym.java
-
newSymbol
Description copied from interface:SymbolFactorynewSymbol creates a basic symbol with an attached value; used frequently for terminal symbols like identifiers- Specified by:
newSymbolin interfaceSymbolFactory- Parameters:
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 symbol
-
startSymbol
Description copied from interface:SymbolFactorynewSymbol creates the start symbol- Specified by:
startSymbolin interfaceSymbolFactory- Parameters:
name- Textual name for the Symbol for verbose error messagesid- enum value associated with this symbol, generated by cup via sym.java
-