public class OpenCLShallowParser extends CppShallowParser
CppShallowParser
. Further it recognizes
OpenCL specific keywords and supports parsing block literal expressions.Modifier and Type | Field and Description |
---|---|
static java.util.EnumSet<ETokenType> |
OPENCL_METHOD_AND_TYPE_DECLARATION_MODIFIERS
Token types that are modifiers in front of a type declaration or method.
|
static java.util.EnumSet<ETokenType> |
OPENCL_PRIMITIVE_TYPES
Token types that are part of a primitive type.
|
static java.util.EnumSet<ETokenType> |
OPENCL_TYPE_OR_IDENTIFIER
Token types for types or identifiers.
|
BASE_TYPE_OR_IDENTIFIER, METHOD_AND_TYPE_DECLARATION_MODIFIERS, PRIMITIVE_TYPES
OPERATORS_WITH_ALTERNATIVE_REPRESENTATION
Constructor and Description |
---|
OpenCLShallowParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
createSimpleStatementRule()
Simple statement.
|
protected void |
createSubExpressionRules()
Creates rules for dealing with constructs in subexpressions, such as
anonymous classes, lambdas, etc.
|
java.util.EnumSet<ETokenType> |
getMethodAndTypeDeclarationModifiers()
Returns all method and type declaration modifiers.
|
protected java.util.EnumSet<ETokenType> |
getPrimitiveTypes()
Returns all primitive token types.
|
protected RecognizerBase<EGenericParserStates> |
getSubExpressionRecognizer()
Returns a recognizer used for detecting sub expressions (anonymous classes,
lambdas, etc.) within expressions.
|
protected java.util.EnumSet<ETokenType> |
getTypeOrIdentifier()
Returns all primitive token types.
|
contributeExpandedMacroRule, createAnnotationSubrecognizer, createCaseRule, createClassElementsRules, createMetaRules, createScopeRecognizer, createTypeRules, filterTokens, getSimpleBlockKeywordsWithoutParentheses, getSimpleBlockKeywordsWithParentheses, getStatementStartTokens, getTypeKeywords, isFilteredToken, typePattern
completeSimpleStatement, completeSimpleStatement, contributeSimpleStatementRules, createBasicBlockRules, createBlockRuleWithContinuation, createDoWhileRule, createElseIfRule, createLambdaWithArrowRules, createStatementRules, createTypedefRules, getTypeModifier, getValidIdentifiers, skipOptionalParameters, typePatternInState
createRecognizer, endWithPossibleContinuation, inAnyState, inState, parse, parseFragment, parseTopLevel
public static final java.util.EnumSet<ETokenType> OPENCL_PRIMITIVE_TYPES
public static final java.util.EnumSet<ETokenType> OPENCL_TYPE_OR_IDENTIFIER
public static final java.util.EnumSet<ETokenType> OPENCL_METHOD_AND_TYPE_DECLARATION_MODIFIERS
public OpenCLShallowParser()
protected java.util.EnumSet<ETokenType> getPrimitiveTypes()
getPrimitiveTypes
in class CppShallowParser
protected java.util.EnumSet<ETokenType> getTypeOrIdentifier()
getTypeOrIdentifier
in class CppShallowParser
public java.util.EnumSet<ETokenType> getMethodAndTypeDeclarationModifiers()
getMethodAndTypeDeclarationModifiers
in class CppShallowParser
protected RecognizerBase<EGenericParserStates> getSubExpressionRecognizer()
getSubExpressionRecognizer
in class CppShallowParser
protected void createSubExpressionRules()
createSubExpressionRules
in class CppShallowParser
protected void createSimpleStatementRule()
createSimpleStatementRule
in class CppShallowParser