|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.treeparser01.TP01Action
public class TP01Action
Superclass of empty actions methods for TreeParser01. Subclasses can override and implement any of these methods, which are all called directly by TreeParser01. TP01Support is the default implementation.
Field Summary | |
---|---|
protected ParseUnit |
parseUnit
|
Constructor Summary | |
---|---|
TP01Action()
|
Method Summary | |
---|---|
protected void |
addToSymbolScope(java.lang.Object o)
Called by the tree parser at the end of a DEFINE statement, passing in the new Variable object which is expected now to be added to the current scope. |
protected void |
blockBegin(AST blockAST)
Beginning of a block. |
protected void |
blockEnd()
End of a block. |
protected void |
browseRef(AST idAST)
The ID node in a BROWSE ID pair. |
protected void |
callBegin(AST callAST)
Node where a call occurs, such as USER_FUNC or LOCAL_METHOD_REF. |
protected void |
callEnd()
Triggered once the call's parameters have been processed. |
protected void |
canFindBegin(AST canfindAST,
AST recordAST)
The tree parser calls this at the start of a can-find, because it needs to have its own buffer and buffer scope. |
protected void |
canFindEnd(AST canfindAST)
Called by the tree parser at the end of a can-find. |
protected void |
classState(AST classAST)
Called by the tree parser at the CLASS node. |
protected void |
clearState(AST headAST)
Called at the end of a CLEAR statement. |
protected void |
datasetTable(AST tableAST)
The RECORD_NAME node for a buffer in a DATASET definition. |
protected void |
defAs(AST asAST)
The tree parser calls this at an AS node |
protected void |
defExtent(AST extentAST)
Called at an EXTENT node, first child is an expression. |
protected Browse |
defineBrowse(AST defAST,
AST idAST)
Called at the start of a DEFINE BROWSE statement. |
protected void |
defineBuffer(AST defAST,
AST idAST,
AST recAST,
boolean init)
Define a buffer. |
protected void |
defineBufferForTrigger(AST recAST)
Define an unnamed buffer which is scoped (symbol and buffer) to the trigger scope/block. |
protected Symbol |
defineSymbol(int symbolType,
AST defAST,
AST idAST)
Called by the tree parser to define anything other than buffers, temp/work tables, and variables/parameters. |
protected void |
defineTableFieldFinalize(java.lang.Object obj)
Called by the tree parser at the end of a temp or work table field definition. |
protected java.lang.Object |
defineTableFieldInitialize(AST idNode)
Called by the tree parser at the beginning of a temp or work table field definition. |
protected void |
defineTableLike(AST recNode)
Called by the tree parser if a LIKE node is encountered in a temp/work table definition. |
protected void |
defineTemptable(AST defAST,
AST idNode)
Called by the tree parser when a temp-table is defined. |
protected Variable |
defineVariable(AST defAST,
AST idNode)
Called by the tree parser when a variable is defined. |
protected Variable |
defineVariable(AST defAST,
AST idAST,
int dataType)
Some syntaxes imply a data type without LIKE/AS. |
protected void |
defineWorktable(AST defAST,
AST idNode)
Called by the tree parser when a work-table is defined. |
protected void |
defLike(AST likeAST)
The tree parser calls this at a LIKE node |
protected void |
field(AST refAST,
AST idAST,
int contextQualifier,
int whichTable)
Process a Field_ref node. |
protected void |
fnvExpression(AST exp)
Action taken in: filenameorvalue: ... |
protected void |
fnvFilename(AST fn)
Action taken in: filenameorvalue: FILENAME production |
protected void |
formItem(AST ast)
Called from Form_item node |
protected void |
frameBlockCheck(AST ast)
Called from DO|REPEAT|FOR blocks. |
protected void |
frameDef(AST defAST,
AST idAST)
Called at tree parser DEFINE FRAME statement. |
protected void |
frameEnablingStatement(AST ast)
This is a specialization of frameInitializingStatement, called for ENABLE|UPDATE|PROMPT-FOR. |
protected void |
frameInitializingStatement(AST ast)
This is called at the beginning of a frame affecting statement, with the statement head node. |
protected void |
frameRef(AST idAST)
Called for the ID node in a #(FRAME ID) pair. |
protected void |
frameStatementEnd()
This is called at the end of a frame affecting statement. |
protected void |
funcBegin(AST funcAST,
AST idAST)
Called immediately after the ID node in a FUNCTION statement/block. |
protected void |
funcDef(AST funcAST,
AST idAST)
Called by the tree parser in a function definition immediately before the code block begins. |
protected void |
funcEnd(AST funcAST)
|
protected void |
funcForward(AST idAST)
Called by the tree parser if a FUNCTION statement is found to be any sort of a function FORWARD, IN, or MAP TO. |
ParseUnit |
getParseUnit()
|
protected void |
lexat(AST fieldRefAST)
Called at the Field_ref node after a lexical '@' sign in a frame phrase. |
protected void |
methodBegin(AST methodAST,
AST idAST)
Called by the tree parser at METHOD statement, after method's scope has been created. |
protected void |
methodEnd(AST methodAST)
|
protected void |
paramBind()
Called if there is a BIND keyword for a parameter. |
protected void |
paramEnd()
Called at the end of the syntax for a formal arg or a Call's parameter. |
protected void |
paramExpression(AST exprAST)
An expression being passed as a parameter (as part of a call). |
protected void |
paramForCall(AST directionAST)
Called with the direction node (BUFFER|INPUT|OUTPUT|INPUTOUTPUT) for a new call arg. |
protected void |
paramForRoutine(AST directionAST)
Called with the direction node (BUFFER|INPUT|OUTPUT|INPUTOUTPUT) for a new formal arg. |
protected void |
paramNoName(AST datatypeAST)
Called for an unnamed parameter, with the datatype or CLASS node. |
protected void |
paramProgressType(int progressType)
Called by the treeparser to set the parameter progressType from default VARIABLE to either TEMPTABLE or DATASET. |
protected void |
paramSymbol(AST symbolAST)
Called with the node that is linked to the Symbol for the current WIP parameter. |
protected void |
procedureBegin(AST p,
AST id)
Called by the tree parser at the beginning of a PROCEDURESTATE rule. |
protected void |
procedureEnd(AST p)
Called by the tree parser at the end of a PROCEDURESTATE rule. |
protected void |
programRoot(AST rootAST)
Called by the tree parser right off the bat, at the Program_root node |
protected void |
programTail()
Called by the tree parser at the end of the program, after Program_tail. |
protected void |
recordNameNode(AST anode,
int contextQualifier)
Action to take at RECORD_NAME nodes. |
protected void |
routineReturnDatatype(AST datatypeAST)
The datatype node or CLASS node for the return of a FUNCTION or METHOD. |
protected void |
runBegin(AST t)
Action to take at the start of RUNSTATE. |
protected void |
runEnd(AST node)
Action to take at the end of RUNSTATE. |
protected void |
runInHandle(AST hn)
Action to take in a RUNSTATE of the form run |
protected void |
runPersistentSet(AST fld)
Action to take in RUNSTATE of the form run |
protected void |
scopeAdd(AST anode)
Called by the tree parser where a symbol scope needs to be added, in other words, in functions, procedures, and triggers. |
protected void |
scopeClose(AST scopeRootNode)
Called by the tree parser immediately after the end of a function, procedure, or trigger block (a symbol scope). |
void |
setParseUnit(ParseUnit parseUnit)
It would be unusual to already have a ParseUnit before calling TP01, since TP01 is usually the first tree parser and it (by default) creates its own ParseUnit. |
protected void |
setSymbol(int symbolType,
AST idAST)
Lookup and assign a symbol to an ID node. |
protected void |
strongScope(AST anode)
Create a "strong" buffer scope. |
protected void |
structorBegin(AST blockAST)
Constructor or destructor node. |
protected void |
structorEnd(AST blockAST)
End of a constructor or destructor. |
protected void |
viewState(AST headAST)
Called with the VIEW statement head, after the VIEW branch has been traversed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ParseUnit parseUnit
Constructor Detail |
---|
public TP01Action()
Method Detail |
---|
protected void addToSymbolScope(java.lang.Object o)
protected void blockBegin(AST blockAST)
protected void blockEnd()
protected void browseRef(AST idAST)
protected void callBegin(AST callAST)
protected void callEnd()
protected void canFindBegin(AST canfindAST, AST recordAST)
protected void canFindEnd(AST canfindAST)
protected void classState(AST classAST)
protected void clearState(AST headAST)
protected void datasetTable(AST tableAST)
protected void defAs(AST asAST)
protected void defExtent(AST extentAST)
protected void defLike(AST likeAST)
protected void defineBuffer(AST defAST, AST idAST, AST recAST, boolean init)
protected Browse defineBrowse(AST defAST, AST idAST)
protected void defineBufferForTrigger(AST recAST)
anode
- The RECORD_NAME node. Must already have the Table symbol linked to it.protected Symbol defineSymbol(int symbolType, AST defAST, AST idAST)
protected java.lang.Object defineTableFieldInitialize(AST idNode)
protected void defineTableFieldFinalize(java.lang.Object obj)
protected void defineTableLike(AST recNode)
protected void defineTemptable(AST defAST, AST idNode)
protected Variable defineVariable(AST defAST, AST idNode)
protected Variable defineVariable(AST defAST, AST idAST, int dataType)
protected void defineWorktable(AST defAST, AST idNode)
protected void field(AST refAST, AST idAST, int contextQualifier, int whichTable)
refAST
- The Field_ref node.idAST
- The ID node.contextQualifier
- What sort of reference is this? Read? Update? Etc.
- whichTable
- For name resolution - which table must this be a field of?
Input 0 for any table, 1 for the lastTableReferenced, 2 for the prevTableReferenced.protected void fnvFilename(AST fn)
protected void fnvExpression(AST exp)
protected void formItem(AST ast)
protected void frameBlockCheck(AST ast)
protected void frameDef(AST defAST, AST idAST)
protected void frameEnablingStatement(AST ast)
protected void frameInitializingStatement(AST ast)
protected void frameStatementEnd()
protected void frameRef(AST idAST)
protected void funcBegin(AST funcAST, AST idAST)
protected void funcDef(AST funcAST, AST idAST)
funcAST
- The FUNCTION node.idAST
- The ID node (the function name).protected void funcForward(AST idAST)
idAST
- The ID node (name of the function).protected void funcEnd(AST funcAST)
public ParseUnit getParseUnit()
protected void lexat(AST fieldRefAST)
protected void methodBegin(AST methodAST, AST idAST)
protected void methodEnd(AST methodAST)
protected void paramBind()
protected void paramEnd()
protected void paramExpression(AST exprAST)
protected void paramForCall(AST directionAST)
protected void paramForRoutine(AST directionAST)
protected void paramNoName(AST datatypeAST)
protected void paramProgressType(int progressType)
protected void paramSymbol(AST symbolAST)
protected void procedureBegin(AST p, AST id)
protected void procedureEnd(AST p)
protected void programRoot(AST rootAST)
protected void programTail()
protected void recordNameNode(AST anode, int contextQualifier)
protected void routineReturnDatatype(AST datatypeAST)
protected void runBegin(AST t)
protected void runEnd(AST node)
protected void runInHandle(AST hn)
in
hn
- - the node for
protected void runPersistentSet(AST fld)
persistent set
fld
- - the field node for
protected void scopeAdd(AST anode)
anode
- The function, procedure, triggers, or on node.protected void scopeClose(AST scopeRootNode)
scopeRootNode
- The function, procedure, triggers, or on node.public void setParseUnit(ParseUnit parseUnit)
protected void setSymbol(int symbolType, AST idAST)
protected void strongScope(AST anode)
anode
- Is the RECORD_NAME node. It must already have
the BufferSymbol linked to it.protected void structorBegin(AST blockAST)
protected void structorEnd(AST blockAST)
protected void viewState(AST headAST)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |