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
- All Known Implementing Classes:
- ActionFragmentApplicationActionImpl, ActionFragmentDeclarationImpl, ActionImpl, ActionRuleDeclarationImpl, AddActionImpl, Antlr3NRLBaseAst, ArithmeticExpressionImpl, BinaryOperatorStatementImpl, BinaryPredicateImpl, BooleanLiteralImpl, CardinalityConstraintImpl, CastExpressionImpl, CollectionIndexImpl, CompoundActionImpl, CompoundReportImpl, ConcatenatedReportImpl, ConditionalActionImpl, ConditionalReportImpl, ConstraintImpl, ConstraintRuleDeclarationImpl, CreateActionImpl, DecimalNumberImpl, DeclarationImpl, ExistsStatementImpl, ForallStatementImpl, ForEachActionImpl, FunctionalExpressionImpl, GlobalExistsStatementImpl, IfThenStatementImpl, IntegerNumberImpl, IsInPredicateImpl, IsNotInPredicateImpl, IsSubtypePredicateImpl, LiteralStringImpl, ModelFileReferenceImpl, ModelReferenceImpl, ModelReferenceStep, MultipleContextDeclarationImpl, MultipleExistsStatementImpl, MultipleNotExistsStatementImpl, NamedParameterImpl, NotExistsStatementImpl, OperatorActionImpl, OperatorFileReferenceImpl, OperatorInvocationImpl, RemoveActionImpl, RemoveFromCollectionActionImpl, RuleFileImpl, RuleSetDeclarationImpl, SelectionExpressionImpl, SetActionImpl, SingleContextDeclarationImpl, ValidationFragmentApplicationImpl, ValidationFragmentDeclarationImpl, VariableDeclarationActionImpl, VariableDeclarationImpl
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)
.
- Author:
- Christian Nentwich
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)
Deprecated. This method will be removed in a future release - it hasn't been implemented
consistently. |
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
@Deprecated
String dump(int indent)
- Deprecated. This method will be removed in a future release - it hasn't been implemented
consistently.
- 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-2013. All Rights Reserved.