Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- add(Interval) - Method in class io.github.douira.glsl_transformer.generic.CachingIntervalSet
-
Adds the given interval to the set.
- add(ParseTreeListener) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Adds the given listener to the list of event notification recipients.
- addChild(int, ParseTree) - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Adds a child to the list of children with at the given index.
- addPhase(int, int, TransformationPhase) - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
Adds a transformation phase to this transformation in a given group and at a given position within that group.
- addPhase(int, TransformationPhase) - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
Adds a transformation phase to this transformation at a specific order but in the default group.
- addPhase(Transformation.PhaseEntry) - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
Adds a transformation phase entry to this transformation.
- addPhase(TransformationPhase) - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
Adds a transformation phase to this transformation.
- afterWalk(GLSLParser.TranslationUnitContext) - Method in class io.github.douira.glsl_transformer.transform.WalkPhase
-
This method is called after the tree walk was performed.
- ASTNode - Class in io.github.douira.glsl_transformer.ast
-
The AST node is a terminal node that can be printed with a method implemented by subclasses.
- ASTNode() - Constructor for class io.github.douira.glsl_transformer.ast.ASTNode
B
- BEFORE_DECLARATIONS - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before declarations like layout and struct, before function definitions
- BEFORE_DIRECTIVES - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before non-extension parsed #-directives such as #pragma, before declarations and function definitions.
- BEFORE_EOF - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before the end of the file, basically the last possible location
- BEFORE_EXTENSIONS - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before the #extension statement, before other directives, declarations and function definitions
- BEFORE_FUNCTIONS - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before function definitions
- BEFORE_VERSION - Enum constant in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Before the #version statement (and all other syntax features by necessity)
- beforeWalk(GLSLParser.TranslationUnitContext) - Method in class io.github.douira.glsl_transformer.transform.WalkPhase
-
This method is called before the tree walk is performed.
- BOOL - Enum constant in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
boolean bit usage
C
- CachingIntervalSet - Class in io.github.douira.glsl_transformer.generic
-
The caching interval set is a regular interval set
IntervalSetbut the @link org.antlr.v4.runtime.misc.IntervalSet#contains(int)} method also does caching of the queries if the set has been set to readonly. - CachingIntervalSet() - Constructor for class io.github.douira.glsl_transformer.generic.CachingIntervalSet
- compactName() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
compactNamerecord component. - ComparablePair<A extends Comparable<A>,
B extends Comparable<B>> - Class in io.github.douira.glsl_transformer.util -
The comparable pair can be compared to another comparable pair.
- ComparablePair(A, B) - Constructor for class io.github.douira.glsl_transformer.util.ComparablePair
-
Creates a new comparable pair with the given parts.
- compareTo(ComparablePair<A, B>) - Method in class io.github.douira.glsl_transformer.util.ComparablePair
- CompatUtil - Class in io.github.douira.glsl_transformer.util
-
This class contains utility methods that allow maintaining Java 8 API compatability.
- CompatUtil() - Constructor for class io.github.douira.glsl_transformer.util.CompatUtil
- compilePath(String) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Compiles the given string as an xpath with the parser.
- compilePattern(String, int) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Compiles the given string as a parse tree matching pattern what starts matching at the given parser rule.
- contains(int) - Method in class io.github.douira.glsl_transformer.generic.CachingIntervalSet
-
Copied from ANTLR's
IntervalSet.contains(int)but with an addition of caching. - createLocalRoot(String, ExtendedContext, Function<GLSLParser, RuleType>) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Parses the given string using the given parser method.
- createTerminalNode(ParserRuleContext, Token) - Method in class io.github.douira.glsl_transformer.generic.ExtendedParser
D
- DebugVisitor - Class in io.github.douira.glsl_transformer
-
The debug visitor prints the tree and some other information to the console.
- DebugVisitor() - Constructor for class io.github.douira.glsl_transformer.DebugVisitor
-
Creates a new debug visitor
- DebugVisitor(int) - Constructor for class io.github.douira.glsl_transformer.DebugVisitor
-
Creates a new debug visitor but with a maximum tree printing depth.
- DEFAULT - Static variable in class io.github.douira.glsl_transformer.transform.DynamicParseTreeWalker
-
The default instance of the dynamic parse tree walker.
- DEFAULT_GROUP - Static variable in class io.github.douira.glsl_transformer.transform.Transformation
-
The default group index.
- DEFINE - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#define
- Directive - Class in io.github.douira.glsl_transformer.ast
-
This class models unparsed directives with the # sign.
- Directive() - Constructor for class io.github.douira.glsl_transformer.ast.Directive
-
Creates a new directive of the empty type.
- Directive(Directive.Type, String) - Constructor for class io.github.douira.glsl_transformer.ast.Directive
-
Crates a new directive with the given directive type and content after the directive name.
- Directive.Type - Enum Class in io.github.douira.glsl_transformer.ast
-
The types of directives that can be generated.
- DynamicParseTreeWalker - Class in io.github.douira.glsl_transformer.transform
-
The dynamic parse tree walker can with structural modification of a node's child array.
- DynamicParseTreeWalker() - Constructor for class io.github.douira.glsl_transformer.transform.DynamicParseTreeWalker
E
- EDBeforeTypes - Variable in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
A set of the rule contexts that can make up a external declaration that each injection point needs to inject before.
- ELIF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#elif
- ELSE - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#else
- EMPTY - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
# (without a name and without content)
- EmptyTerminalNode - Class in io.github.douira.glsl_transformer.generic
-
The empty terminal node is a placeholder in parse tree children lists in order to prevent exceptions from being thrown because the parse tree walker expects child lists not to change length during iteration.
- EmptyTerminalNode(TreeMember) - Constructor for class io.github.douira.glsl_transformer.generic.EmptyTerminalNode
-
Creates a new empty terminal node with a given previous node.
- ENDIF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#endif
- enterEveryRule(ParserRuleContext) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
- equals(Object) - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Indicates whether some other object is "equal to" this one.
- ERROR - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#error
- exitEveryRule(ParserRuleContext) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
- explicitName() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
explicitNamerecord component. - ExtendedContext - Class in io.github.douira.glsl_transformer.generic
-
Implements custom behavior in parse rule contexts.
- ExtendedContext(ParserRuleContext, int) - Constructor for class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Creates a new extended parser rule context.
- ExtendedParser - Class in io.github.douira.glsl_transformer.generic
-
This class is used as the base parser class in code generated by ANTLR.
- ExtendedParser(TokenStream) - Constructor for class io.github.douira.glsl_transformer.generic.ExtendedParser
-
Creates a new extended parser.
- ExtendedTerminalNode - Class in io.github.douira.glsl_transformer.generic
-
The extended terminal node has additional functionality over the regular terminal node.
- ExtendedTerminalNode() - Constructor for class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
-
Creates a null-token and parentless terminal node.
- ExtendedTerminalNode(ExtendedContext) - Constructor for class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
-
Creates a null-token terminal node that has an extended context as a parent.
- ExtendedTerminalNode(ParserRuleContext, Token) - Constructor for class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
-
Creates a new extended terminal node with a parent node and a token as the symbol.
F
- findAndMatch(ParseTree, XPath, ParseTreePattern) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
This method uses a statically constructed xpath so it doesn't need to be repeatedly constructed.
- finishEditingTree() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Marks editing on the whole tree as finished.
- FLOATING - Enum constant in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
floating point bit usage
- fromMessage(String, String) - Static method in class io.github.douira.glsl_transformer.transformation.target.ThrowTarget
-
Creates a new throw target with a fixed message instead of using the implemented method of a subclass to generate exceptions.
G
- getChildIndexLike(Class<? extends ParseTree>) - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Finds the index of the first contained child that matches the given type.
- getCollector() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Gets this phase's phase collector.
- getCompactName() - Method in class io.github.douira.glsl_transformer.ast.Tensor
-
Returns the compact name of the contained type.
- getContent() - Method in class io.github.douira.glsl_transformer.ast.StringNode
-
Returns the string node's content.
- getDefaultGroup() - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
Returns the default group for this transformation that is used for adding phases if not specified otherwise.
- getExplicitName() - Method in class io.github.douira.glsl_transformer.ast.Tensor
-
Returns the explicit name of the contained type.
- getFullSourceInterval() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Gets the source interval for this local root that includes the whole token stream with unparsed tokens before and after the parsed tokens that this node encompasses.
- getLargestSourceInterval() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Gets the source interval for this node that covers the largest space.
- getLexer() - Method in class io.github.douira.glsl_transformer.transform.PhaseCollector
-
Returns the phase collector's lexer.
- getLexer() - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
- getLexer() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Returns the executing phase collector's lexer.
- getMessage(TreeMember, String) - Method in class io.github.douira.glsl_transformer.transformation.target.ThrowTarget
-
Generates the exception when this target is found.
- getNeedle() - Method in class io.github.douira.glsl_transformer.transformation.target.HandlerTarget
-
Returns the string to search for.
- getNode() - Method in exception io.github.douira.glsl_transformer.transform.SemanticException
-
Returns the exception's parse tree node if there is one.
- getOmissionSet() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
The omission set is present if this node is a local root.
- getOutputParseMethod() - Method in class io.github.douira.glsl_transformer.ast.ParsableASTNode
-
This method is overwritten by the implementing class to specify with which parser method the generated string should be parsed.
- getOutputParseMethod() - Method in class io.github.douira.glsl_transformer.ast.Tensor
- getParent() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Override to make type more specific
- getParent() - Method in class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
-
Override to make type more specific
- getParent() - Method in interface io.github.douira.glsl_transformer.generic.TreeMember
-
Gets the parent of this node.
- getParsed() - Method in class io.github.douira.glsl_transformer.ast.ParsableASTNode
-
Parses this AST node's generated code into a parse tree node without attaching a parent node.
- getParsed(ExtendedContext) - Method in class io.github.douira.glsl_transformer.ast.ParsableASTNode
-
Parses the code generated by this AST node with the parser method supplied by
ParsableASTNode.getOutputParseMethod()into a parse tree node.. - getParser() - Method in class io.github.douira.glsl_transformer.transform.PhaseCollector
-
Returns this phase collector's parser.
- getParser() - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
The returned parser (and lexer) may contain no token stream or a wrong token stream.
- getParser() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Returns the executing phase collector's parser.
- getPrinted() - Method in class io.github.douira.glsl_transformer.ast.ASTNode
-
Generates the string representation of this AST object as it would be in the generated code.
- getPrinted() - Method in class io.github.douira.glsl_transformer.ast.Directive
- getPrinted() - Method in class io.github.douira.glsl_transformer.ast.StringNode
- getPrinted() - Method in class io.github.douira.glsl_transformer.ast.Tensor
- getReplacement(TreeMember, String) - Method in class io.github.douira.glsl_transformer.transformation.target.ReplaceTarget
-
Returns the node to insert replacing the node found with the search string.
- getRootNode() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Returns the root node taken from the phase collector that is currently executing this phase.
- getSiblings(TreeMember) - Static method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Gets the sibling nodes of a given node.
- getText() - Method in class io.github.douira.glsl_transformer.ast.UnparsableASTNode
- getTokenStream() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
The token stream is present if this node is a local root.
- group() - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Returns the value of the
grouprecord component.
H
- handleResult(TreeMember, String) - Method in class io.github.douira.glsl_transformer.transformation.target.HandlerTarget
-
Handles the containing node and token that the string was found in.
- handleResult(TreeMember, String) - Method in class io.github.douira.glsl_transformer.transformation.target.ReplaceTarget
- handleResult(TreeMember, String) - Method in class io.github.douira.glsl_transformer.transformation.target.ThrowTarget
- HandlerTarget - Class in io.github.douira.glsl_transformer.transformation.target
-
A handler target contains a string to search for and a method that is called to handle finding the string in a parse tree.
- HandlerTarget(String) - Constructor for class io.github.douira.glsl_transformer.transformation.target.HandlerTarget
-
Creates a new handler target with the given search string
- hashCode() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Returns a hash code value for this object.
- highestDimension() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
highestDimensionrecord component.
I
- IF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#if
- IFDEF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#ifdef
- IFNDEF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#ifndef
- INCLUDE - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#include
- init() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
This method is called right after this phase is collected by the phase collector.
- injectDefine(String, TransformationPhase.InjectionPoint) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Injects a new
#definestatement at the specified location. - injectExternalDeclaration(String, TransformationPhase.InjectionPoint) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Injects the given string parsed as an external declaration.
- injectNode(ParseTree, TransformationPhase.InjectionPoint) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Injects the given node into the translation unit context root node at the given injection point.
- injectNodes(Deque<ParseTree>, TransformationPhase.InjectionPoint) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Injects a list of nodes into the translation unit context node.
- input - Variable in class io.github.douira.glsl_transformer.transform.TransformationManager
-
The last parsed input stream.
- INTEGER - Enum constant in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
uint-like bit usage, non-signed
- INTERNAL - Static variable in class io.github.douira.glsl_transformer.transform.TransformationManager
-
An internal instance of this class that is used by other library-internal classes for parsing needs.
- io.github.douira.glsl_transformer - package io.github.douira.glsl_transformer
- io.github.douira.glsl_transformer.ast - package io.github.douira.glsl_transformer.ast
- io.github.douira.glsl_transformer.generic - package io.github.douira.glsl_transformer.generic
- io.github.douira.glsl_transformer.transform - package io.github.douira.glsl_transformer.transform
- io.github.douira.glsl_transformer.transformation - package io.github.douira.glsl_transformer.transformation
- io.github.douira.glsl_transformer.transformation.target - package io.github.douira.glsl_transformer.transformation.target
- io.github.douira.glsl_transformer.util - package io.github.douira.glsl_transformer.util
- isActive() - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Overwrite this method to add a check of if this phase should be run at all.
- isActiveAfterWalk() - Method in class io.github.douira.glsl_transformer.transform.WalkPhase
-
Determines if this phase's
afterWalk(TranslationUnitContext)should be run. - isActiveAtWalk() - Method in class io.github.douira.glsl_transformer.transform.WalkPhase
-
Determines if the phase's listener methods should be run.
- isActiveBeforeWalk() - Method in class io.github.douira.glsl_transformer.transform.WalkPhase
-
Determines if this phase's
beforeWalk(TranslationUnitContext)should be run. - isEmpty() - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Checks if the list of listeners is empty.
- isLocalRoot() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Checks if this node is a local root.
- isRoot() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Checks if this node is the global root.
- isTokenAllowed(Token) - Method in class io.github.douira.glsl_transformer.generic.CachingIntervalSet
-
Checks if the given token is covered by this set if it's being used as an omission set.
L
- LINE - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#line
- listOf(T...) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
-
Creates an
ArrayListthat contains the given items in the same order.
M
- makeLocalRoot(BufferedTokenStream) - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Registers this node as a new local root node together with its corresponding token stream.
- MoveCheckable - Interface in io.github.douira.glsl_transformer.generic
-
The move checkable interface provides a method for checking if the implementing node replaces a given node.
N
- numberType() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
numberTyperecord component.
O
- omitTokens() - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Marks the tokens encompassed by this node as omitted.
- omitTokens() - Method in class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
- omitTokens() - Method in interface io.github.douira.glsl_transformer.generic.TreeMember
-
Omits the tokens this node encompasses from the next local root.
- omitTokens(Interval) - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Omits the given token interval on this node's local root.
- order() - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Returns the value of the
orderrecord component.
P
- ParsableASTNode - Class in io.github.douira.glsl_transformer.ast
-
The parsable a AST node defines how AST nodes that can be converted back into parse tree nodes are handled.
- ParsableASTNode() - Constructor for class io.github.douira.glsl_transformer.ast.ParsableASTNode
- parse(String, ExtendedContext, Function<GLSLParser, RuleType>) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
Parses a string using a parser method reference into a parse tree.
- parse(String, Function<GLSLParser, RuleType>) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
Parses a string using a parser method reference into a parse tree.
- parse(IntStream, ExtendedContext, Function<GLSLParser, RuleType>) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
Parses an int stream (which is similar to a string) using a parser method reference into a parse tree.
- phase() - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Returns the value of the
phaserecord component. - PhaseCollector - Class in io.github.douira.glsl_transformer.transform
-
The phase collector holds the registered transformations and manages their execution.
- PhaseCollector() - Constructor for class io.github.douira.glsl_transformer.transform.PhaseCollector
- PhaseEntry(TransformationPhase, int, int) - Constructor for record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Creates an instance of a
PhaseEntryrecord class. - printTree(BufferedTokenStream, ExtendedContext) - Static method in class io.github.douira.glsl_transformer.generic.PrintVisitor
-
Prints the given parse tree that references the given token stream.
- PrintVisitor - Class in io.github.douira.glsl_transformer.generic
-
The print visitor visits the parse tree and reprints it while preserving the position and content of hidden tokens.
- ProcessIdentifiers - Class in io.github.douira.glsl_transformer.transformation
-
This phase finds targets in identifiers and triggers their handlers.
- ProcessIdentifiers(HandlerTarget) - Constructor for class io.github.douira.glsl_transformer.transformation.ProcessIdentifiers
-
Creates a new identifier search phase with only a single target.
- ProcessIdentifiers(Collection<HandlerTarget>) - Constructor for class io.github.douira.glsl_transformer.transformation.ProcessIdentifiers
-
Creates a new identifier search phase with the given targets.
- ProxyParseTreeListener - Class in io.github.douira.glsl_transformer.generic
-
This class was taken from here and was added to the public domain by the author DaveJarvis Instances of this class allows multiple listeners to receive events while walking the parse tree.
- ProxyParseTreeListener() - Constructor for class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Creates a new proxy without an empty list of listeners.
- ProxyParseTreeListener(List<ParseTreeListener>) - Constructor for class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Creates a new proxy with the given list of listeners.
R
- registerTransformation(Transformation) - Method in class io.github.douira.glsl_transformer.transform.PhaseCollector
-
Registers a single transformation with this phase collector.
- registerTransformationMultiple(Consumer<PhaseCollector>) - Method in class io.github.douira.glsl_transformer.transform.PhaseCollector
-
Registers multiple transformations by calling a function that consumes a phase collector.
- remove(ParseTreeListener) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Removes the given listener to the list of event notification recipients.
- removeNode(TreeMember) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Removes the given node from its parent's child list.
- repeat(String, int) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
-
Repeats the given string a number of times.
- ReplaceDeclarations - Class in io.github.douira.glsl_transformer.transformation
-
The declaration replacement finds layout declarations and replaces all references to them with function calls and other code.
- ReplaceDeclarations() - Constructor for class io.github.douira.glsl_transformer.transformation.ReplaceDeclarations
-
Creates a new declaration replacement transformation with a walk phase for finding declarations and one for inserting calls to the generated functions.
- replaceNode(TreeMember, TreeMember) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Replaces the given node in its parent with a new given node.
- replaceNode(TreeMember, String, Function<GLSLParser, ExtendedContext>) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Replaces the given node in its parent with a new node generated by parsing the given string with the given method of the parser.
- replaces(ParseTree, ParseTree) - Static method in interface io.github.douira.glsl_transformer.generic.MoveCheckable
-
Checks if any given parse tree node replaces another.
- replacesNode(ParseTree) - Method in class io.github.douira.glsl_transformer.generic.EmptyTerminalNode
- replacesNode(ParseTree) - Method in interface io.github.douira.glsl_transformer.generic.MoveCheckable
-
Checks if the implementing object was inserted into the tree to replace the given node.
- ReplaceTarget - Class in io.github.douira.glsl_transformer.transformation.target
-
A replacement target searches for a search string and uses a method to generate a tree member to replace it in the tree.
- ReplaceTarget(String) - Constructor for class io.github.douira.glsl_transformer.transformation.target.ReplaceTarget
-
Creates a new replace target with a given search string
- resetState() - Method in class io.github.douira.glsl_transformer.transform.Transformation
-
This method is called by the phase collector each time a tree is transformed in order to reset or initialize the state of the transformation if it has any.
- resetState() - Method in class io.github.douira.glsl_transformer.transformation.ReplaceDeclarations
- run(GLSLParser.TranslationUnitContext) - Method in class io.github.douira.glsl_transformer.transform.RunPhase
-
This method is implemented by subclasses to be executed by the phase collector at the right time.
- RunPhase - Class in io.github.douira.glsl_transformer.transform
-
A run phase simply executes one method when it is executed in a level by the phase collector.
- RunPhase() - Constructor for class io.github.douira.glsl_transformer.transform.RunPhase
S
- SemanticException - Exception in io.github.douira.glsl_transformer.transform
-
The semantic exception should be thrown by a transformation phase when the parsed code has semantic errors or there is some other content-related reason why the transformation process should be halted.
- SemanticException() - Constructor for exception io.github.douira.glsl_transformer.transform.SemanticException
-
Creates a new empty semantic exception.
- SemanticException(String) - Constructor for exception io.github.douira.glsl_transformer.transform.SemanticException
-
Creates a new semantic exception with a message string.
- SemanticException(String, ParseTree) - Constructor for exception io.github.douira.glsl_transformer.transform.SemanticException
-
Creates a new semantic exception with a message string and a parse tree node.
- setCollector(PhaseCollector) - Method in class io.github.douira.glsl_transformer.transform.TransformationPhase
-
Sets the phase collector on this phase.
- setCollector(PhaseCollector) - Method in class io.github.douira.glsl_transformer.transformation.target.HandlerTarget
- setListeners(List<ParseTreeListener>) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
-
Changes the list of listeners to receive events.
- setOf(T) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
-
Creates a
HashSetthat contains the given item. - setOf(T...) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
-
Creates a
HashSetthat contains the given items. - setOf(T, T) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
-
Creates a
HashSetthat contains the given items. - setParent(ExtendedContext) - Method in class io.github.douira.glsl_transformer.generic.ExtendedContext
-
Sets the parent and copies the root reference from the parent.
- shape() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
shaperecord component. - SIGNED_INTEGER - Enum constant in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
int-like bit usage, signed
- spaceDimensions() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
spaceDimensionsrecord component. - StringNode - Class in io.github.douira.glsl_transformer.ast
-
String node provides a terminal node with arbitrary contents.
- StringNode(String) - Constructor for class io.github.douira.glsl_transformer.ast.StringNode
-
Creates a new string node with the given string content.
- StringToken - Class in io.github.douira.glsl_transformer.generic
-
The string token allows the creation of a custom token with any string as the token's content.
- StringToken(String) - Constructor for class io.github.douira.glsl_transformer.generic.StringToken
-
Creates a new string token with a given string.
T
- Tensor - Class in io.github.douira.glsl_transformer.ast
-
A tensor abstractly represents the many multidimensional number types that GLSL has.
- Tensor(int) - Constructor for class io.github.douira.glsl_transformer.ast.Tensor
-
Creates a new tensor with the type given as a lexer token index.
- Tensor(Tensor.Type) - Constructor for class io.github.douira.glsl_transformer.ast.Tensor
-
Creates a new tensor with the given type.
- Tensor(GLSLParser.BuiltinTypeSpecifierParseableContext) - Constructor for class io.github.douira.glsl_transformer.ast.Tensor
-
Creates a new tensor from the given type specifier parse tree node.
- Tensor(String) - Constructor for class io.github.douira.glsl_transformer.ast.Tensor
-
Creates a new tensor by parsing the type specified in the given string.
- Tensor.NumberType - Enum Class in io.github.douira.glsl_transformer.ast
-
The different ways bits in a tensor can be interpreted.
- Tensor.Type - Record Class in io.github.douira.glsl_transformer.ast
-
The shape is an array of up to three integers describing how big this tensor is in each dimension.
- ThrowTarget - Class in io.github.douira.glsl_transformer.transformation.target
-
A target that searches for a search string in and upon finding a match uses a method to generate an exception which is then thrown.
- ThrowTarget(String) - Constructor for class io.github.douira.glsl_transformer.transformation.target.ThrowTarget
-
Creates a new throw target with a given search string
- tokenStream - Variable in class io.github.douira.glsl_transformer.transform.TransformationManager
-
The last parsed tokens stream.
- tokenType() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns the value of the
tokenTyperecord component. - toString() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.douira.glsl_transformer.transform.Transformation.PhaseEntry
-
Returns a string representation of this record class.
- transform(String) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
Transforms the given string by parsing, transforming it with the already registered transformations and then re-printing it.
- Transformation - Class in io.github.douira.glsl_transformer.transform
-
The transformation is the vehicle through which transformation phases, which do all the actual transforming work, are added to the phase collector.
- Transformation() - Constructor for class io.github.douira.glsl_transformer.transform.Transformation
-
Creates a stateless transformation with no transformation phases, which can be added later.
- Transformation(TransformationPhase) - Constructor for class io.github.douira.glsl_transformer.transform.Transformation
-
Creates a stateless transformation and adds a single phase to it.
- Transformation.PhaseEntry - Record Class in io.github.douira.glsl_transformer.transform
-
The record used to store added transformation phases with their order and group index.
- TransformationManager - Class in io.github.douira.glsl_transformer.transform
-
Implements the phase collector by providing the boilerplate code for setting up an input, a lexer and a parser.
- TransformationManager() - Constructor for class io.github.douira.glsl_transformer.transform.TransformationManager
-
Creates a new transformation manager that throws parse errors by default.
- TransformationManager(boolean) - Constructor for class io.github.douira.glsl_transformer.transform.TransformationManager
-
Creates a new transformation manager and specifies if parse errors should be thrown during parsing.
- TransformationPhase - Class in io.github.douira.glsl_transformer.transform
-
The transformations phase actually does a specific transformation.
- TransformationPhase() - Constructor for class io.github.douira.glsl_transformer.transform.TransformationPhase
- TransformationPhase.InjectionPoint - Enum Class in io.github.douira.glsl_transformer.transform
-
Shader code is expected to be roughly structured as follows: version, extensions, other directives (#define, #pragma etc.), declarations (layout etc.), functions (void main etc.).
- transformStream(IntStream) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
-
Transforms a given input stream and re-prints it as a string.
- transformTree(GLSLParser.TranslationUnitContext, BufferedTokenStream) - Method in class io.github.douira.glsl_transformer.transform.PhaseCollector
-
Transforms the given parse tree with the registered transformations.
- TreeMember - Interface in io.github.douira.glsl_transformer.generic
-
A tree member has a parent and its tokens can be omitted.
- Type(int, Tensor.NumberType, int[], int, int, String, String) - Constructor for record class io.github.douira.glsl_transformer.ast.Tensor.Type
-
Creates an instance of a
Typerecord class.
U
- UNDEF - Enum constant in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
#undef
- UnparsableASTNode - Class in io.github.douira.glsl_transformer.ast
-
The unparsable AST node is basically just a wrapper around a terminal node that contains a custom string.
- UnparsableASTNode() - Constructor for class io.github.douira.glsl_transformer.ast.UnparsableASTNode
V
- valueOf(String) - Static method in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class io.github.douira.glsl_transformer.ast.Directive.Type
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.github.douira.glsl_transformer.ast.Tensor.NumberType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.github.douira.glsl_transformer.transform.TransformationPhase.InjectionPoint
-
Returns an array containing the constants of this enum class, in the order they are declared.
- visitAndJoin(BufferedTokenStream, ExtendedContext, Interval) - Method in class io.github.douira.glsl_transformer.generic.PrintVisitor
-
This is the lowest level printing method that should be used publicly.
- visitChildren(RuleNode) - Method in class io.github.douira.glsl_transformer.DebugVisitor
- visitChildren(RuleNode) - Method in class io.github.douira.glsl_transformer.generic.PrintVisitor
-
The visitor method that the print visitor overrides in order to collect each node's intervals.
- visitErrorNode(ErrorNode) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
- visitTerminal(TerminalNode) - Method in class io.github.douira.glsl_transformer.generic.PrintVisitor
- visitTerminal(TerminalNode) - Method in class io.github.douira.glsl_transformer.generic.ProxyParseTreeListener
- visitTerminal(TerminalNode) - Method in class io.github.douira.glsl_transformer.transformation.ProcessIdentifiers
W
- walk(ParseTreeListener, ParseTree) - Method in class io.github.douira.glsl_transformer.transform.DynamicParseTreeWalker
-
Copied from ANTLR's
ParseTreeWalker.walk(org.antlr.v4.runtime.tree.ParseTreeListener, org.antlr.v4.runtime.tree.ParseTree)but with compensation for items being added to the child array. - WalkPhase - Class in io.github.douira.glsl_transformer.transform
-
The walk phase is a phase on which the listener methods of the generated listener interface are called.
- WalkPhase() - Constructor for class io.github.douira.glsl_transformer.transform.WalkPhase
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form