Package adams.parser.actorsuggestion
Class Parser
- java.lang.Object
-
- java_cup.runtime.lr_parser
-
- adams.parser.actorsuggestion.Parser
-
public class Parser extends java_cup.runtime.lr_parserCUP v0.11b 20160615 (GIT 4ac7450) generated parser.
-
-
Field Summary
Fields Modifier and Type Field Description protected static short[][]_action_tableParse-action table.protected static short[][]_production_tableProduction table.protected static short[][]_reduce_tablereduce_gototable.protected adams.parser.actorsuggestion.Parser.CUP$Parser$actionsaction_objInstance of action encapsulation class.protected Node[]m_ActorNodesall the current nodes in which to insert/add to the proposed actor.protected Actor[]m_Actorsall the current actors in which to insert/add to the proposed actor.protected Compatibilitym_Compatibilityfor checking compatibility.protected ParserHelperm_Helperthe helper.protected Actorm_LastParentthe last parent used.protected Nodem_LastParentNodethe last parent node used.protected Actorm_Parentthe parent of the proposed actor.protected Nodem_ParentNodethe parent node of the proposed actor.protected Integerm_Positionthe position to add the proposed actor at.protected Actorm_Resultfor storing the result of the expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short[][]action_table()Access to parse-action table.BooleancheckParent(String classname, boolean exact, boolean anyParent)Checks whether the parent is the specified classname.java_cup.runtime.Symboldo_action(int act_num, java_cup.runtime.lr_parser parser, Stack stack, int top)Invoke a user supplied parse action.intEOF_sym()EOFSymbol index.interror_sym()errorSymbol index.BooleanfollowingAccepts(String classname)Checks whether the following actor accepts the specified class.Node[]getActorNodes()Returns the nodes in which to insert the proposed actor.Actor[]getActors()Returns the actors in which to insert the proposed actor.ParserHelpergetHelper()Returns the parser helper.ActorgetParent()Returns the parent of the proposed actor.NodegetParentNode()Returns the parent node of the proposed actor.IntegergetPosition()Returns the position of the proposed actor.ActorgetResult()Returns the result of the evaluation.ClassgetSymbolContainer()protected voidinit_actions()Action encapsulation object initializer.StringinsertPlaceholders(String cmdline)Processes the commandline and fills in placeholders: classname: ${PARENT.CLASS}, ${LASTPARENT.CLASS}, ${PRECEDING.CLASS}, ${FOLLOWING.CLASS} actor's name: ${PARENT.NAME}, ${LASTPARENT.NAME}, ${PRECEDING.NAME}, ${FOLLOWING.NAME} actor's full name: ${PARENT.FULL}, ${LASTPARENT.FULL}, ${PRECEDING.FULL}, ${FOLLOWING.FULL}BooleanisClassname(boolean before, String classname)Checks whether the actor will get added before or after a specific actor (exact classname or interface classname).BooleanisFirst()Returns whether the proposed actor will get added at the first position.BooleanisLast()Returns whether the proposed actor will get added at the last position.BooleanisSink(boolean before)Checks whether the actor will get added before or after a sink actor.BooleanisSource(boolean before)Checks whether the actor will get added before or after a source actor.BooleanisStandalone(boolean before)Checks whether the actor will get added before or after a standalone actor.BooleanisTransformer(boolean before)Checks whether the actor will get added before or after a transformer actor.BooleanprecedingGenerates(String classname)Checks whether the preceding actor generates the specified class.short[][]production_table()Access to production table.short[][]reduce_table()Access toreduce_gototable.voidsetActorNodes(Node[] value)Sets the nodes in which to insert the proposed actor.voidsetActors(Actor[] value)Sets the actors in which to insert the proposed actor.voidsetParent(Actor value)Sets the parent of the proposed actor.voidsetParentNode(Node value)Sets the parent node of the proposed actor.voidsetPosition(Integer value)Sets the position of the proposed actor.voidsetResult(Actor value)Sets the result of the evaluation.intstart_production()Indicates start production.intstart_state()Indicates start state.-
Methods inherited from class java_cup.runtime.lr_parser
advance_lookahead, cur_err_token, debug_message, debug_parse, debug_reduce, debug_shift, debug_stack, done_parsing, dump_stack, error_recovery, error_sync_size, expected_token_ids, find_recovery_config, get_action, get_reduce, getScanner, getSymbolFactory, parse, parse_lookahead, read_lookahead, report_error, report_expected_token_ids, report_fatal_error, restart_lookahead, scan, setScanner, shift_under_error, symbl_name_from_id, syntax_error, try_parse_ahead, unpackFromStrings, unrecovered_syntax_error, user_init
-
-
-
-
Field Detail
-
_production_table
protected static final short[][] _production_table
Production table.
-
_action_table
protected static final short[][] _action_table
Parse-action table.
-
_reduce_table
protected static final short[][] _reduce_table
reduce_gototable.
-
action_obj
protected adams.parser.actorsuggestion.Parser.CUP$Parser$actions action_obj
Instance of action encapsulation class.
-
m_Helper
protected ParserHelper m_Helper
the helper.
-
m_Result
protected Actor m_Result
for storing the result of the expression.
-
m_Parent
protected Actor m_Parent
the parent of the proposed actor.
-
m_ParentNode
protected Node m_ParentNode
the parent node of the proposed actor.
-
m_LastParent
protected Actor m_LastParent
the last parent used.
-
m_LastParentNode
protected Node m_LastParentNode
the last parent node used.
-
m_Position
protected Integer m_Position
the position to add the proposed actor at.
-
m_Actors
protected Actor[] m_Actors
all the current actors in which to insert/add to the proposed actor.
-
m_ActorNodes
protected Node[] m_ActorNodes
all the current nodes in which to insert/add to the proposed actor.
-
m_Compatibility
protected Compatibility m_Compatibility
for checking compatibility.
-
-
Constructor Detail
-
Parser
@Deprecated public Parser()
Deprecated.Default constructor.
-
Parser
@Deprecated public Parser(java_cup.runtime.Scanner s)
Deprecated.Constructor which sets the default scanner.
-
Parser
public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf)Constructor which sets the default scanner.
-
-
Method Detail
-
getSymbolContainer
public final Class getSymbolContainer()
- Overrides:
getSymbolContainerin classjava_cup.runtime.lr_parser
-
production_table
public short[][] production_table()
Access to production table.- Specified by:
production_tablein classjava_cup.runtime.lr_parser
-
action_table
public short[][] action_table()
Access to parse-action table.- Specified by:
action_tablein classjava_cup.runtime.lr_parser
-
reduce_table
public short[][] reduce_table()
Access toreduce_gototable.- Specified by:
reduce_tablein classjava_cup.runtime.lr_parser
-
init_actions
protected void init_actions()
Action encapsulation object initializer.- Specified by:
init_actionsin classjava_cup.runtime.lr_parser
-
do_action
public java_cup.runtime.Symbol do_action(int act_num, java_cup.runtime.lr_parser parser, Stack stack, int top) throws ExceptionInvoke a user supplied parse action.- Specified by:
do_actionin classjava_cup.runtime.lr_parser- Throws:
Exception
-
start_state
public int start_state()
Indicates start state.- Specified by:
start_statein classjava_cup.runtime.lr_parser
-
start_production
public int start_production()
Indicates start production.- Specified by:
start_productionin classjava_cup.runtime.lr_parser
-
EOF_sym
public int EOF_sym()
EOFSymbol index.- Specified by:
EOF_symin classjava_cup.runtime.lr_parser
-
error_sym
public int error_sym()
errorSymbol index.- Specified by:
error_symin classjava_cup.runtime.lr_parser
-
getHelper
public ParserHelper getHelper()
Returns the parser helper.- Returns:
- the helper
-
setResult
public void setResult(Actor value)
Sets the result of the evaluation.- Parameters:
value- the result
-
getResult
public Actor getResult()
Returns the result of the evaluation.- Returns:
- the result
-
setParent
public void setParent(Actor value)
Sets the parent of the proposed actor.- Parameters:
value- the actor
-
getParent
public Actor getParent()
Returns the parent of the proposed actor.- Returns:
- the parent
-
setParentNode
public void setParentNode(Node value)
Sets the parent node of the proposed actor.- Parameters:
value- the actor
-
getParentNode
public Node getParentNode()
Returns the parent node of the proposed actor.- Returns:
- the parent
-
setPosition
public void setPosition(Integer value)
Sets the position of the proposed actor.- Parameters:
value- the position
-
getPosition
public Integer getPosition()
Returns the position of the proposed actor.- Returns:
- the position
-
setActors
public void setActors(Actor[] value)
Sets the actors in which to insert the proposed actor.- Parameters:
value- the actors
-
getActors
public Actor[] getActors()
Returns the actors in which to insert the proposed actor.- Returns:
- the actors
-
setActorNodes
public void setActorNodes(Node[] value)
Sets the nodes in which to insert the proposed actor.- Parameters:
value- the nodes
-
getActorNodes
public Node[] getActorNodes()
Returns the nodes in which to insert the proposed actor.- Returns:
- the nodes
-
isFirst
public Boolean isFirst()
Returns whether the proposed actor will get added at the first position.- Returns:
- true if the actor gets added at the first position
-
isLast
public Boolean isLast()
Returns whether the proposed actor will get added at the last position.- Returns:
- true if the actor gets added at the last position
-
isStandalone
public Boolean isStandalone(boolean before)
Checks whether the actor will get added before or after a standalone actor.- Parameters:
before- whether the actor gets added before or after- Returns:
- true if the actor gets added before/after a standalone one
-
isSource
public Boolean isSource(boolean before)
Checks whether the actor will get added before or after a source actor.- Parameters:
before- whether the actor gets added before or after- Returns:
- true if the actor gets added before/after a source one
-
isTransformer
public Boolean isTransformer(boolean before)
Checks whether the actor will get added before or after a transformer actor.- Parameters:
before- whether the actor gets added before or after- Returns:
- true if the actor gets added before/after a transformer one
-
isSink
public Boolean isSink(boolean before)
Checks whether the actor will get added before or after a sink actor.- Parameters:
before- whether the actor gets added before or after- Returns:
- true if the actor gets added before/after a sink one
-
isClassname
public Boolean isClassname(boolean before, String classname)
Checks whether the actor will get added before or after a specific actor (exact classname or interface classname).- Parameters:
before- whether the actor gets added before or afterclassname- the name of the actor (or interface) to check against- Returns:
- true if the actor gets added before/after a specific one
-
checkParent
public Boolean checkParent(String classname, boolean exact, boolean anyParent)
Checks whether the parent is the specified classname.- Parameters:
classname- the class that parent must beexact- whether to perform exact classname matching (or just an instance of)anyParent- if any parent in the node hierarchy is tested- Returns:
- true if it is a match
-
precedingGenerates
public Boolean precedingGenerates(String classname)
Checks whether the preceding actor generates the specified class.- Parameters:
classname- the class that the preceding actor must generate- Returns:
- true if the preceding actor generates the specified class
-
followingAccepts
public Boolean followingAccepts(String classname)
Checks whether the following actor accepts the specified class.- Parameters:
classname- the class that the following actor must accept- Returns:
- true if the following actor accepts the specified class
-
insertPlaceholders
public String insertPlaceholders(String cmdline)
Processes the commandline and fills in placeholders: classname: ${PARENT.CLASS}, ${LASTPARENT.CLASS}, ${PRECEDING.CLASS}, ${FOLLOWING.CLASS} actor's name: ${PARENT.NAME}, ${LASTPARENT.NAME}, ${PRECEDING.NAME}, ${FOLLOWING.NAME} actor's full name: ${PARENT.FULL}, ${LASTPARENT.FULL}, ${PRECEDING.FULL}, ${FOLLOWING.FULL}- Parameters:
cmdline- the commandline to process- Returns:
- the fullname of the specified actor or empty string if not available
- See Also:
m_LastParent,m_LastParentNode
-
-