java.lang.Object
de.grogra.xl.compiler.pattern.PatternBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Compiler
static boolean
protected final PatternBuilder
protected final CompiletimeModel
protected final Type
protected final ProblemReporter
protected final BlockScope
-
Constructor Summary
ConstructorDescriptionPatternBuilder
(CompiletimeModel model, PatternBuilder parent, BlockScope scope, antlr.collections.AST pos) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAny
(antlr.collections.AST label, antlr.collections.AST pos) void
addBlock
(Expression block, antlr.collections.AST pos) addComposite
(antlr.collections.AST label, PatternBuilder child, EdgeDirection direction, boolean optional, antlr.collections.AST pos) void
addCondition
(antlr.collections.AST label, Expression expr, antlr.collections.AST pos) addConstantEdge
(antlr.collections.AST label, EdgeDirection direction, Type edgeClass, Serializable edge, antlr.collections.AST pos) void
addEdge
(antlr.collections.AST label, EdgeDirection direction, Expression term, antlr.collections.AST pos) void
addEdgePattern
(antlr.collections.AST label, PatternWrapper edge, ArgumentDescription[] args, EdgeDirection direction, antlr.collections.AST pos) void
addExpression
(antlr.collections.AST label, Expression expr, antlr.collections.AST pos) void
addFolding
(antlr.collections.AST id) void
addGuard
(antlr.collections.AST label, Expression guard, antlr.collections.AST pos) final SimplePatternData
addNodePattern
(antlr.collections.AST label, PatternWrapper pred, ArgumentDescription[] args, antlr.collections.AST pos) final SimplePatternData
addNodePattern
(antlr.collections.AST label, BuiltInPattern pred, ArgumentDescription[] args, antlr.collections.AST pos) void
addPathExpression
(antlr.collections.AST label, Expression expr, boolean swapInOut, antlr.collections.AST pos) final SimplePatternData
addPattern
(antlr.collections.AST label, Pattern pred, ArgumentDescription[] args, antlr.collections.AST pos) protected final SimplePatternData
addPattern
(antlr.collections.AST label, Pattern pred, ArgumentDescription[] args, antlr.collections.AST pos, boolean join) void
addRelation
(antlr.collections.AST label, Expression expr, boolean swapInOut, antlr.collections.AST pos) final SimplePatternData
addRelationPattern
(antlr.collections.AST label, PatternWrapper pred, ArgumentDescription[] args, boolean swapInOut, antlr.collections.AST pos) final SimplePatternData
addRelationPattern
(antlr.collections.AST label, BuiltInPattern pred, ArgumentDescription[] args, boolean swapInOut, antlr.collections.AST pos) void
addSeparation
(antlr.collections.AST pos) void
addStandardEdge
(antlr.collections.AST label, EdgeDirection direction, int edgeType, antlr.collections.AST pos) addTraversal
(antlr.collections.AST label, PatternBuilder child, EdgeDirection direction, Expression min, Expression max, boolean addFolding, antlr.collections.AST pos) void
void
addVariableReference
(Local term, antlr.collections.AST pos) void
addWrappedType
(antlr.collections.AST label, Type type, Expression wrapped, antlr.collections.AST pos) void
void
beginContext
(antlr.collections.AST pos) void
beginTree
(antlr.collections.AST pos) static final Expression
createArgument
(Type type) static final Expression
declareAuxVariable
(Type type) protected MethodScope
declareRoutine
(Expression expr, ObjectList termLocals, HashSet used, HashSet assigned) declareVariable
(antlr.collections.AST name, Type type) declareWrapper
(Local wrapped, Type type, antlr.collections.AST pos) boolean
void
endContext
(antlr.collections.AST pos) void
endTree
(antlr.collections.AST pos) Local[]
getModel()
getScope()
protected void
-
Field Details
-
DEBUG
public static boolean DEBUG -
model
-
enclosing
-
scope
-
compiler
-
problems
-
nodeType
-
-
Constructor Details
-
PatternBuilder
public PatternBuilder(CompiletimeModel model, PatternBuilder parent, BlockScope scope, antlr.collections.AST pos)
-
-
Method Details
-
getQueryState
-
enclosesOrEquals
-
allowOpenEnds
public void allowOpenEnds() -
getModel
-
getScope
-
declareAuxVariable
-
declareWrapper
-
declareVariable
-
getDeclaredVariables
-
createCompositePattern
-
addNodePattern
public final SimplePatternData addNodePattern(antlr.collections.AST label, BuiltInPattern pred, ArgumentDescription[] args, antlr.collections.AST pos) -
addNodePattern
public final SimplePatternData addNodePattern(antlr.collections.AST label, PatternWrapper pred, ArgumentDescription[] args, antlr.collections.AST pos) -
addRelationPattern
public final SimplePatternData addRelationPattern(antlr.collections.AST label, BuiltInPattern pred, ArgumentDescription[] args, boolean swapInOut, antlr.collections.AST pos) -
addRelationPattern
public final SimplePatternData addRelationPattern(antlr.collections.AST label, PatternWrapper pred, ArgumentDescription[] args, boolean swapInOut, antlr.collections.AST pos) -
addPattern
public final SimplePatternData addPattern(antlr.collections.AST label, Pattern pred, ArgumentDescription[] args, antlr.collections.AST pos) -
addPattern
protected final SimplePatternData addPattern(antlr.collections.AST label, Pattern pred, ArgumentDescription[] args, antlr.collections.AST pos, boolean join) -
getLastNodeType
-
addVariableReference
-
addTraversal
public TraversalData addTraversal(antlr.collections.AST label, PatternBuilder child, EdgeDirection direction, Expression min, Expression max, boolean addFolding, antlr.collections.AST pos) -
addComposite
public CompositeData addComposite(antlr.collections.AST label, PatternBuilder child, EdgeDirection direction, boolean optional, antlr.collections.AST pos) -
addAny
public void addAny(antlr.collections.AST label, antlr.collections.AST pos) -
addSeparation
public void addSeparation(antlr.collections.AST pos) -
join
-
addStandardEdge
public void addStandardEdge(antlr.collections.AST label, EdgeDirection direction, int edgeType, antlr.collections.AST pos) -
addConstantEdge
public SimplePatternData addConstantEdge(antlr.collections.AST label, EdgeDirection direction, Type edgeClass, Serializable edge, antlr.collections.AST pos) -
addEdge
public void addEdge(antlr.collections.AST label, EdgeDirection direction, Expression term, antlr.collections.AST pos) -
addEdgePattern
public void addEdgePattern(antlr.collections.AST label, PatternWrapper edge, ArgumentDescription[] args, EdgeDirection direction, antlr.collections.AST pos) -
addType
-
addWrappedType
public void addWrappedType(antlr.collections.AST label, Type type, Expression wrapped, antlr.collections.AST pos) -
addCondition
-
addGuard
-
createArgument
-
createTargetTypeArgument
-
declareRoutine
protected MethodScope declareRoutine(Expression expr, ObjectList termLocals, HashSet used, HashSet assigned) -
addRelation
public void addRelation(antlr.collections.AST label, Expression expr, boolean swapInOut, antlr.collections.AST pos) -
addBlock
-
addPathExpression
public void addPathExpression(antlr.collections.AST label, Expression expr, boolean swapInOut, antlr.collections.AST pos) -
addExpression
-
addFolding
public void addFolding(antlr.collections.AST id) -
beginTree
public void beginTree(antlr.collections.AST pos) -
endTree
public void endTree(antlr.collections.AST pos) -
beginContext
public void beginContext(antlr.collections.AST pos) -
endContext
public void endContext(antlr.collections.AST pos)
-