net.sourceforge.nrl.parser.ast
Interface INRLAstNode
- All Known Subinterfaces:
- IAction, IActionFragmentApplicationAction, IActionFragmentDeclaration, IActionRuleDeclaration, IAddAction, IArithmeticExpression, IBinaryOperatorStatement, IBinaryPredicate, IBooleanLiteral, ICardinalityConstraint, ICastExpression, ICollectionIndex, ICompoundAction, ICompoundReport, IConcatenatedReport, IConditionalAction, IConditionalReport, IConstraint, IConstraintRuleDeclaration, ICreateAction, IDecimalNumber, IDeclaration, IExistsStatement, IExpression, IForallStatement, IForEachAction, IFunctionalExpression, IGlobalExistsStatement, IIdentifier, IIfThenStatement, IIntegerNumber, IIsInPredicate, IIsNotInPredicate, IIsSubtypePredicate, ILiteralString, IModelFileReference, IModelReference, IMultipleContextDeclaration, IMultipleExistsStatement, IMultipleNotExistsStatement, INotExistsStatement, IOperatorAction, IOperatorFileReference, IOperatorInvocation, IPredicate, IRemoveAction, IRemoveFromCollectionAction, IRuleDeclaration, IRuleFile, IRuleSetDeclaration, ISelectionExpression, ISetAction, ISimpleAction, ISimpleReport, ISingleContextDeclaration, IValidationFragmentApplication, IValidationFragmentDeclaration, IVariableDeclaration, IVariableDeclarationAction
public interface INRLAstNode
Basic interface for all NRL constructs. Has a line and column number. To convert to a total character
position, use StringUtilities.getCharacterPosition(String, int, int)
.
Field Summary |
static String |
NEWLINE
Newline constant for output purposes |
Method Summary |
void |
accept(INRLAstVisitor visitor)
Accept a visitor to this node. |
String |
dump(int indent)
Dump the AST and its children for debugging purposes |
int |
getColumn()
Return the column in the input file where this node occurred. |
int |
getLine()
Return the line in the input file where this node occurred. |
Object |
getUserData(String key)
Return a named user data object associated with this AST node. |
void |
setUserData(String key,
Object data)
Associate user data with this AST node, under a given key. |
NEWLINE
static final String NEWLINE
- Newline constant for output purposes
accept
void accept(INRLAstVisitor visitor)
- Accept a visitor to this node.
- Parameters:
visitor
- the visitor
getColumn
int getColumn()
- Return the column in the input file where this node occurred.
- Returns:
- the column, 1-based
getLine
int getLine()
- Return the line in the input file where this node occurred.
- Returns:
- the line, 1-based
getUserData
Object getUserData(String key)
- Return a named user data object associated with this AST node.
- Parameters:
key
- the key identifying the data
- Returns:
- the object or null if no such data
dump
String dump(int indent)
- Dump the AST and its children for debugging purposes
- Parameters:
indent
- the indentation count, 0 on first call
- Returns:
- the AST as a string
setUserData
void setUserData(String key,
Object data)
- Associate user data with this AST node, under a given key.
- Parameters:
key
- the keydata
- the data
Copyright © 2006-2010 Christian Nentwich and others