Class GlslParserImpl
java.lang.Object
io.github.ocelot.glslprocessor.core.GlslParserImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GlslTreestatic @Nullable GlslNodestatic @Nullable GlslNodeparseAndExpression(GlslTokenReader reader) static @Nullable GlslSpecifiedTypeparseArraySpecifier(GlslTokenReader reader, GlslSpecifiedType type) static @Nullable GlslTypeSpecifierparseArraySpecifier(GlslTokenReader reader, GlslTypeSpecifier type) static @Nullable GlslNodestatic @Nullable GlslCaseLabelNodeparseCaseLabel(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodeparseCondition(GlslTokenReader reader) static @Nullable GlslNodestatic GlslNodeparseConditionopt(GlslTokenReader reader) parseDeclaration(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodeparseExpression(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodeparseForInitStatement(GlslTokenReader reader) static @Nullable GlslSpecifiedTypestatic @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslFunctionNodestatic @Nullable GlslFunctionHeaderstatic @Nullable GlslFunctionHeaderparseIdentifierList(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodeparseInitializer(GlslTokenReader reader) parseInitializerList(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslNodeparseJumpStatement(GlslTokenReader reader) static @Nullable GlslTypeQualifierparseLayoutQualifier(GlslTokenReader reader) static @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslParameterDeclarationstatic @Nullable GlslParameterDeclarationstatic List<GlslParameterDeclaration>parseParameterList(GlslTokenReader reader) static @Nullable GlslNodeparsePostfixExpression(boolean allowFunction, GlslTokenReader reader) static GlslTypeQualifier.Precisionstatic @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslNodestatic @Nullable GlslNodeparseShiftExpression(GlslTokenReader reader) static @Nullable GlslNodeparseSimpleExpression(GlslTokenReader reader, Function<GlslTokenReader, GlslNode> parser, GlslLexer.TokenType operator, Function<List<GlslNode>, GlslNode> join) parseSimpleStatement(GlslTokenReader reader) static @Nullable GlslNodeparseSingleDeclaration(@Nullable GlslSpecifiedType fullySpecifiedType, GlslTokenReader reader) parseStatement(GlslTokenReader reader) parseStatementList(GlslTokenReader reader) static @Nullable GlslTypeQualifierparseStorageQualifier(GlslTokenReader reader) static @Nullable List<GlslStructField>static @Nullable List<GlslStructField>static @Nullable GlslStructFieldparseStructDeclarator(GlslSpecifiedType type, GlslTokenReader reader) static @Nullable List<GlslStructField>parseStructDeclaratorList(GlslSpecifiedType type, GlslTokenReader reader) static @Nullable GlslStructSpecifierparseStructSpecifier(GlslTokenReader reader) static @Nullable GlslNodeparseSwitchStatement(GlslTokenReader reader) static @Nullable List<GlslTypeQualifier>parseTypeQualifiers(GlslTokenReader reader) static @Nullable GlslTypeSpecifierparseTypeSpecifier(GlslTokenReader reader) static @Nullable GlslNodeparseUnaryExpression(GlslTokenReader reader) static Stringpreprocess(String input, Map<String, String> macros)
-
Field Details
-
VERSION_PATTERN
-
STRIP_PATTERN
-
UNSTRIP_PATTERN
-
-
Constructor Details
-
GlslParserImpl
public GlslParserImpl()
-
-
Method Details
-
preprocess
- Throws:
LexerException
-
parse
- Throws:
GlslSyntaxException
-
parsePrimaryExpression
-
parsePostfixExpression
@Nullable public static @Nullable GlslNode parsePostfixExpression(boolean allowFunction, GlslTokenReader reader) -
parseIntegerExpression
-
parseFunctionCallGeneric
-
parseFunctionCallHeader
-
parseUnaryExpression
-
parseSimpleExpression
@Nullable public static @Nullable GlslNode parseSimpleExpression(GlslTokenReader reader, Function<GlslTokenReader, GlslNode> parser, GlslLexer.TokenType operator, Function<List<GlslNode>, GlslNode> join) -
parseMultiplicativeExpression
-
parseAdditiveExpression
-
parseShiftExpression
-
parseRelationalExpression
-
parseEqualityExpression
-
parseAndExpression
-
parseExclusiveOrExpression
-
parseInclusiveOrExpression
-
parseLogicalAndExpression
-
parseLogicalXorExpression
-
parseLogicalOrExpression
-
parseConditionalExpression
-
parseAssignmentExpression
-
parseExpression
-
parseDeclaration
-
parseIdentifierList
-
parseFunctionPrototype
-
parseParameterList
-
parseFunctionHeaderWithParameters
@Nullable public static @Nullable GlslFunctionHeader parseFunctionHeaderWithParameters(GlslTokenReader reader) -
parseParameterDeclarator
@Nullable public static @Nullable GlslParameterDeclaration parseParameterDeclarator(GlslTokenReader reader) -
parseParameterDeclaration
@Nullable public static @Nullable GlslParameterDeclaration parseParameterDeclaration(GlslTokenReader reader) -
parseInitDeclaratorList
-
parseSingleDeclaration
@Nullable public static @Nullable GlslNode parseSingleDeclaration(@Nullable @Nullable GlslSpecifiedType fullySpecifiedType, GlslTokenReader reader) -
parseFullySpecifiedType
-
parseInterpolationQualifier
@Nullable public static GlslTypeQualifier.Interpolation parseInterpolationQualifier(GlslTokenReader reader) -
parseLayoutQualifier
-
parseTypeQualifiers
@Nullable public static @Nullable List<GlslTypeQualifier> parseTypeQualifiers(GlslTokenReader reader) -
parseStorageQualifier
-
parseTypeSpecifier
-
parseArraySpecifier
@Nullable public static @Nullable GlslSpecifiedType parseArraySpecifier(GlslTokenReader reader, GlslSpecifiedType type) -
parseArraySpecifier
@Nullable public static @Nullable GlslTypeSpecifier parseArraySpecifier(GlslTokenReader reader, GlslTypeSpecifier type) -
parsePrecisionQualifier
-
parseStructSpecifier
-
parseStructDeclarationList
@Nullable public static @Nullable List<GlslStructField> parseStructDeclarationList(GlslTokenReader reader) -
parseStructDeclaration
@Nullable public static @Nullable List<GlslStructField> parseStructDeclaration(GlslTokenReader reader) -
parseStructDeclaratorList
@Nullable public static @Nullable List<GlslStructField> parseStructDeclaratorList(GlslSpecifiedType type, GlslTokenReader reader) -
parseStructDeclarator
@Nullable public static @Nullable GlslStructField parseStructDeclarator(GlslSpecifiedType type, GlslTokenReader reader) -
parseInitializer
-
parseInitializerList
-
parseStatement
-
parseSimpleStatement
-
parseCompoundStatement
-
parseStatementNoNewScope
-
parseCompoundStatementNoNewScope
-
parseStatementList
-
parseExpressionStatement
-
parseSelectionStatement
-
parseCondition
-
parseSwitchStatement
-
parseCaseLabel
-
parseIterationStatement
-
parseForInitStatement
-
parseConditionopt
-
parseJumpStatement
-
parseFunctionDefinition
-