Index

A B C D E F G H I J L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

add(Interval) - Method in class io.github.douira.glsl_transformer.print.CachingIntervalSet
Adds the given interval to the set.
add(ParseTreeListener) - Method in class io.github.douira.glsl_transformer.transform.ProxyParseTreeListener
Adds the given listener to the list of event notification recipients.
addChild(int, ParseTree) - Method in class io.github.douira.glsl_transformer.tree.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.
addTokenFilter(TokenFilter) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
Adds a token filter for printing.
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.print
The caching interval set is a regular interval set IntervalSet but 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.print.CachingIntervalSet
 
ChannelFilter - Class in io.github.douira.glsl_transformer.print.filter
The channel filter accepts all tokens that are not from a lexer channel that is on the given list of disallowed channels.
ChannelFilter(TokenFilter.TokenChannel) - Constructor for class io.github.douira.glsl_transformer.print.filter.ChannelFilter
Creates a new channel filter with a single disallowed channel.
ChannelFilter(EnumSet<TokenFilter.TokenChannel>) - Constructor for class io.github.douira.glsl_transformer.print.filter.ChannelFilter
Creates a new channel filter with the given disallowed channels.
COMMENTS - Enum constant in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
The custom comments channel
compactName() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
Returns the value of the compactName record 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.print.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.tree.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 - Enum constant in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
The default channel
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.print
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.print.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.transform.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.transform.ProxyParseTreeListener
 
explicitName() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
Returns the value of the explicitName record component.
ExtendedContext - Class in io.github.douira.glsl_transformer.tree
Implements custom behavior in parse rule contexts.
ExtendedContext(ParserRuleContext, int) - Constructor for class io.github.douira.glsl_transformer.tree.ExtendedContext
Creates a new extended parser rule context.
ExtendedParser - Class in io.github.douira.glsl_transformer.tree
This class is used as the base parser class in code generated by ANTLR.
ExtendedParser(TokenStream) - Constructor for class io.github.douira.glsl_transformer.tree.ExtendedParser
Creates a new extended parser.
ExtendedTerminalNode - Class in io.github.douira.glsl_transformer.tree
The extended terminal node has additional functionality over the regular terminal node.
ExtendedTerminalNode() - Constructor for class io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
Creates a null-token and parentless terminal node.
ExtendedTerminalNode(ExtendedContext) - Constructor for class io.github.douira.glsl_transformer.tree.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.tree.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.tree.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.tree.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.tree.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.tree.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.tree.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.tree.ExtendedContext
Override to make type more specific
getParent() - Method in class io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
Override to make type more specific
getParent() - Method in interface io.github.douira.glsl_transformer.tree.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
 
getTokenChannel(Token) - Static method in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
Returns the channel enum for this token's integer channel number.
getTokenStream() - Method in class io.github.douira.glsl_transformer.tree.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 group record 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.
HIDDEN - Enum constant in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
The default hidden channel
highestDimension() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
Returns the value of the highestDimension record 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 #define statement 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.print - package io.github.douira.glsl_transformer.print
 
io.github.douira.glsl_transformer.print.filter - package io.github.douira.glsl_transformer.print.filter
 
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.tree - package io.github.douira.glsl_transformer.tree
 
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.transform.ProxyParseTreeListener
Checks if the list of listeners is empty.
isLocalRoot() - Method in class io.github.douira.glsl_transformer.tree.ExtendedContext
Checks if this node is a local root.
isRoot() - Method in class io.github.douira.glsl_transformer.tree.ExtendedContext
Checks if this node is the global root.
isTokenAllowed(Token) - Method in class io.github.douira.glsl_transformer.print.CachingIntervalSet
Checks if the given token is covered by this set if it's being used as an omission set.
isTokenAllowed(Token) - Method in class io.github.douira.glsl_transformer.print.filter.ChannelFilter
 
isTokenAllowed(Token) - Method in class io.github.douira.glsl_transformer.print.filter.MultiFilter
 
isTokenAllowed(Token) - Method in class io.github.douira.glsl_transformer.print.filter.NewlineFilter
 
isTokenAllowed(Token) - Method in interface io.github.douira.glsl_transformer.print.filter.TokenFilter
Checks if the token should be printed.

J

join(TokenFilter, TokenFilter) - Static method in interface io.github.douira.glsl_transformer.print.filter.TokenFilter
Joins two arbitrary token filters into a new filter.

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 ArrayList that contains the given items in the same order.

M

makeLocalRoot(BufferedTokenStream) - Method in class io.github.douira.glsl_transformer.tree.ExtendedContext
Registers this node as a new local root node together with its corresponding token stream.
MoveCheckable - Interface in io.github.douira.glsl_transformer.transform
The move checkable interface provides a method for checking if the implementing node replaces a given node.
MultiFilter - Class in io.github.douira.glsl_transformer.print.filter
A multi filter checks all contained filters with either requiring all of them or at least one of them to allow the token.
MultiFilter() - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new empty default multi filter.
MultiFilter(boolean, boolean) - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new multi filter the behavior options.
MultiFilter(int) - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new default multi filter with an initial size capacity.
MultiFilter(int, boolean, boolean) - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new multi filter with an initial size capacity and the behavior options.
MultiFilter(Collection<? extends TokenFilter>) - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new default multi filter with the given list of subfilters.
MultiFilter(Collection<? extends TokenFilter>, boolean, boolean) - Constructor for class io.github.douira.glsl_transformer.print.filter.MultiFilter
Creates a new multi filter with the given list of subfilters and the behavior options.

N

NewlineFilter - Class in io.github.douira.glsl_transformer.print.filter
The newline filter filters out regular unnecessary newlines if there is more than one.
NewlineFilter() - Constructor for class io.github.douira.glsl_transformer.print.filter.NewlineFilter
 
numberType() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
Returns the value of the numberType record component.

O

omitTokens() - Method in class io.github.douira.glsl_transformer.tree.ExtendedContext
Marks the tokens encompassed by this node as omitted.
omitTokens() - Method in class io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
 
omitTokens() - Method in interface io.github.douira.glsl_transformer.tree.TreeMember
Omits the tokens this node encompasses from the next local root.
omitTokens(Interval) - Method in class io.github.douira.glsl_transformer.tree.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 order record 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 phase record 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 PhaseEntry record class.
PREPROCESSOR - Enum constant in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
The custom preprocessor channel
printTree(BufferedTokenStream, ExtendedContext) - Static method in class io.github.douira.glsl_transformer.print.PrintVisitor
Prints the given parse tree that references the given token stream.
printTree(BufferedTokenStream, ExtendedContext, TokenFilter) - Static method in class io.github.douira.glsl_transformer.print.PrintVisitor
Prints the given parse tree that references the given token stream.
PrintVisitor - Class in io.github.douira.glsl_transformer.print
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.transform
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.transform.ProxyParseTreeListener
Creates a new proxy without an empty list of listeners.
ProxyParseTreeListener(List<ParseTreeListener>) - Constructor for class io.github.douira.glsl_transformer.transform.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.transform.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.transform.MoveCheckable
Checks if any given parse tree node replaces another.
replacesNode(ParseTree) - Method in class io.github.douira.glsl_transformer.print.EmptyTerminalNode
 
replacesNode(ParseTree) - Method in interface io.github.douira.glsl_transformer.transform.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.print.filter.MultiFilter
 
resetState() - Method in class io.github.douira.glsl_transformer.print.filter.NewlineFilter
 
resetState() - Method in interface io.github.douira.glsl_transformer.print.filter.TokenFilter
Resets the filter's state.
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
 
setConjunction(boolean) - Method in class io.github.douira.glsl_transformer.print.filter.MultiFilter
Sets the conjunction behavior flag
setListeners(List<ParseTreeListener>) - Method in class io.github.douira.glsl_transformer.transform.ProxyParseTreeListener
Changes the list of listeners to receive events.
setOf(T) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
Creates a HashSet that contains the given item.
setOf(T...) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
Creates a HashSet that contains the given items.
setOf(T, T) - Static method in class io.github.douira.glsl_transformer.util.CompatUtil
Creates a HashSet that contains the given items.
setParent(ExtendedContext) - Method in class io.github.douira.glsl_transformer.tree.ExtendedContext
Sets the parent and copies the root reference from the parent.
setShortCircuit(boolean) - Method in class io.github.douira.glsl_transformer.print.filter.MultiFilter
Sets the conjunction short circuit flag
setTokenFilter(TokenFilter) - Method in class io.github.douira.glsl_transformer.transform.TransformationManager
Sets the token filter to use for printing a tree.
shape() - Method in record class io.github.douira.glsl_transformer.ast.Tensor.Type
Returns the value of the shape record 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 spaceDimensions record 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.

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
TokenFilter - Interface in io.github.douira.glsl_transformer.print.filter
A token filter is an object that can check if given tokens should be printed or not.
TokenFilter.TokenChannel - Enum Class in io.github.douira.glsl_transformer.print.filter
A list of the possible channels a token can have.
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 tokenType record 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.tree
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 Type record 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.print.filter.TokenFilter.TokenChannel
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.print.filter.TokenFilter.TokenChannel
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.
visitChildren(RuleNode) - Method in class io.github.douira.glsl_transformer.DebugVisitor
 
visitChildren(RuleNode) - Method in class io.github.douira.glsl_transformer.print.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.transform.ProxyParseTreeListener
 
visitTerminal(TerminalNode) - Method in class io.github.douira.glsl_transformer.print.PrintVisitor
 
visitTerminal(TerminalNode) - Method in class io.github.douira.glsl_transformer.transform.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
 
WHITESPACE - Enum constant in enum class io.github.douira.glsl_transformer.print.filter.TokenFilter.TokenChannel
The custom whitespace channel
A B C D E F G H I J L M N O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form