|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.prorefactor.treeparser01.TP01Action org.prorefactor.treeparser01.TP01Support
public class TP01Support
Provides all functions called by TreeParser01. TreeParser01 does not, itself, define any actions. Instead, it only makes calls to the functions defined in this class.
Field Summary |
---|
Fields inherited from class org.prorefactor.treeparser01.TP01Action |
---|
parseUnit |
Constructor Summary | |
---|---|
TP01Support()
|
Method Summary | |
---|---|
void |
addToSymbolScope(java.lang.Object o)
Called at the *end* of the statement that defines the symbol. |
void |
blockBegin(AST blockAST)
Beginning of a block. |
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)
A CAN-FIND needs to have its own buffer and buffer scope, because CAN-FIND(x where x.y = z) does *not* cause a buffer reference to be created for x within the surrounding block. |
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 tableAST,
boolean init)
Define a buffer. |
protected void |
defineBufferForTrigger(AST tableAST)
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 |
defineTable(JPNode defNode,
JPNode idNode,
int storeType)
|
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 idAST)
Defining a table field is done in two steps. |
protected void |
defineTableLike(AST tableAST)
Called by the tree parser if a LIKE node is encountered in a temp/work table definition. |
protected void |
defineTemptable(AST defAST,
AST idAST)
Called by the tree parser when a temp-table is defined. |
protected Variable |
defineVariable(AST defAST,
AST idAST)
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 idAST)
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 node)
Called by the tree parser at filenameorvalue: VALUE(expression), passing in the expression node. |
protected void |
fnvFilename(AST node)
Called by the tree parser for filenameorvalue: FILENAME production Partly implemented for Calls and Routines. |
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. |
SymbolScope |
getCurrentScope()
|
ErrorList |
getErrorList()
Partly implemented for Calls and Routines. |
SymbolScopeRoot |
getRootScope()
|
protected void |
lexat(AST fieldRefAST)
Called at the Field_ref node after a lexical '@' sign in a frame phrase. |
protected void |
methodBegin(AST blockAST,
AST idAST)
Called by the tree parser at METHOD statement, after method's scope has been created. |
protected void |
methodEnd(AST blockAST)
|
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 a parameter with no identifier. |
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 Block |
popBlock()
|
protected void |
procedureBegin(AST procAST,
AST idAST)
Called by the tree parser at the beginning of a PROCEDURESTATE rule. |
protected void |
procedureEnd(AST node)
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 Block |
pushBlock(Block block)
|
protected void |
recordNameNode(AST anode,
int contextQualifier)
Action to take at various 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 runAST)
Called by the tree parser at the beginning of a RUN statement. |
protected void |
runEnd(AST node)
Called by the tree parser in the RUN statement right before any parameters. |
protected void |
runInHandle(AST exprNode)
Called by the tree parser for RUN IN HANDLE. |
protected void |
runPersistentSet(AST fld)
Called by the tree parser for RUN PERSISTENT SET. |
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). |
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. |
protected void |
structorEnd(AST blockAST)
End of constructor or destructor. |
protected void |
viewState(AST headAST)
Called at the end of a VIEW statement. |
Methods inherited from class org.prorefactor.treeparser01.TP01Action |
---|
getParseUnit, setParseUnit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TP01Support()
Method Detail |
---|
public void addToSymbolScope(java.lang.Object o)
addToSymbolScope
in class TP01Action
public void blockBegin(AST blockAST)
blockBegin
in class TP01Action
public void blockEnd()
blockEnd
in class TP01Action
protected void browseRef(AST idAST)
browseRef
in class TP01Action
protected void callBegin(AST callAST)
TP01Action
callBegin
in class TP01Action
protected void callEnd()
TP01Action
callEnd
in class TP01Action
protected void canFindBegin(AST canfindAST, AST recordAST)
canFindBegin
in class TP01Action
protected void canFindEnd(AST canfindAST)
TP01Action
canFindEnd
in class TP01Action
protected void classState(AST classAST)
TP01Action
classState
in class TP01Action
protected void clearState(AST headAST)
TP01Action
clearState
in class TP01Action
protected void datasetTable(AST tableAST)
TP01Action
datasetTable
in class TP01Action
protected void defAs(AST asAST)
defAs
in class TP01Action
protected void defExtent(AST extentAST)
TP01Action
defExtent
in class TP01Action
protected void defLike(AST likeAST)
defLike
in class TP01Action
protected Browse defineBrowse(AST defAST, AST idAST)
defineBrowse
in class TP01Action
protected void defineBuffer(AST defAST, AST idAST, AST tableAST, boolean init)
defineBuffer
in class TP01Action
protected void defineBufferForTrigger(AST tableAST)
defineBufferForTrigger
in class TP01Action
tableAST
- The RECORD_NAME node. Must already have the Table symbol linked to it.protected Symbol defineSymbol(int symbolType, AST defAST, AST idAST)
TP01Action
defineSymbol
in class TP01Action
protected java.lang.Object defineTableFieldInitialize(AST idAST)
defineTableFieldInitialize
in class TP01Action
defineTableFieldFinalize(Object)
protected void defineTableFieldFinalize(java.lang.Object obj)
TP01Action
defineTableFieldFinalize
in class TP01Action
protected void defineTableLike(AST tableAST)
TP01Action
defineTableLike
in class TP01Action
protected void defineTable(JPNode defNode, JPNode idNode, int storeType)
protected void defineTemptable(AST defAST, AST idAST)
TP01Action
defineTemptable
in class TP01Action
protected Variable defineVariable(AST defAST, AST idAST)
TP01Action
defineVariable
in class TP01Action
protected Variable defineVariable(AST defAST, AST idAST, int dataType)
TP01Action
defineVariable
in class TP01Action
protected void defineWorktable(AST defAST, AST idAST)
TP01Action
defineWorktable
in class TP01Action
protected void field(AST refAST, AST idAST, int contextQualifier, int whichTable)
field
in class TP01Action
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 fnvExpression(AST node)
fnvExpression
in class TP01Action
protected void fnvFilename(AST node)
fnvFilename
in class TP01Action
protected void formItem(AST ast)
formItem
in class TP01Action
protected void frameBlockCheck(AST ast)
frameBlockCheck
in class TP01Action
protected void frameDef(AST defAST, AST idAST)
frameDef
in class TP01Action
protected void frameEnablingStatement(AST ast)
frameEnablingStatement
in class TP01Action
protected void frameInitializingStatement(AST ast)
frameInitializingStatement
in class TP01Action
protected void frameStatementEnd()
frameStatementEnd
in class TP01Action
protected void frameRef(AST idAST)
TP01Action
frameRef
in class TP01Action
protected void funcBegin(AST funcAST, AST idAST)
TP01Action
funcBegin
in class TP01Action
protected void funcDef(AST funcAST, AST idAST)
TP01Action
funcDef
in class TP01Action
funcAST
- The FUNCTION node.idAST
- The ID node (the function name).protected void funcEnd(AST funcAST)
funcEnd
in class TP01Action
protected void funcForward(AST idAST)
TP01Action
funcForward
in class TP01Action
idAST
- The ID node (name of the function).public SymbolScope getCurrentScope()
public ErrorList getErrorList()
public SymbolScopeRoot getRootScope()
protected void lexat(AST fieldRefAST)
TP01Action
lexat
in class TP01Action
protected void methodBegin(AST blockAST, AST idAST)
TP01Action
methodBegin
in class TP01Action
protected void methodEnd(AST blockAST)
methodEnd
in class TP01Action
protected void paramBind()
TP01Action
paramBind
in class TP01Action
protected void paramEnd()
TP01Action
paramEnd
in class TP01Action
protected void paramExpression(AST exprAST)
TP01Action
paramExpression
in class TP01Action
protected void paramForCall(AST directionAST)
TP01Action
paramForCall
in class TP01Action
protected void paramForRoutine(AST directionAST)
TP01Action
paramForRoutine
in class TP01Action
protected void paramNoName(AST datatypeAST)
paramNoName
in class TP01Action
datatypeAST
- The node of the datatype, might be a CLASS node.protected void paramProgressType(int progressType)
TP01Action
paramProgressType
in class TP01Action
protected void paramSymbol(AST symbolAST)
TP01Action
paramSymbol
in class TP01Action
protected Block popBlock()
protected void procedureBegin(AST procAST, AST idAST)
TP01Action
procedureBegin
in class TP01Action
protected void procedureEnd(AST node)
TP01Action
procedureEnd
in class TP01Action
protected void programRoot(AST rootAST)
TP01Action
programRoot
in class TP01Action
protected void programTail()
TP01Action
programTail
in class TP01Action
protected Block pushBlock(Block block)
protected void recordNameNode(AST anode, int contextQualifier)
recordNameNode
in class TP01Action
protected void routineReturnDatatype(AST datatypeAST)
TP01Action
routineReturnDatatype
in class TP01Action
protected void runBegin(AST runAST)
runBegin
in class TP01Action
protected void runEnd(AST node)
runEnd
in class TP01Action
protected void runInHandle(AST exprNode)
runInHandle
in class TP01Action
exprNode
- - the node for protected void runPersistentSet(AST fld)
runPersistentSet
in class TP01Action
fld
- is used for error reporting.protected void scopeAdd(AST anode)
TP01Action
scopeAdd
in class TP01Action
anode
- The function, procedure, triggers, or on node.protected void scopeClose(AST scopeRootNode)
TP01Action
scopeClose
in class TP01Action
scopeRootNode
- The function, procedure, triggers, or on node.protected void setSymbol(int symbolType, AST idAST)
TP01Action
setSymbol
in class TP01Action
protected void strongScope(AST anode)
strongScope
in class TP01Action
anode
- Is the RECORD_NAME node. It must already have
the BufferSymbol linked to it.protected void structorBegin(AST blockAST)
structorBegin
in class TP01Action
protected void structorEnd(AST blockAST)
structorEnd
in class TP01Action
protected void viewState(AST headAST)
viewState
in class TP01Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |