Package eu.bandm.tools.ramus.ogma
Enum Class Parser.Pragma
- All Implemented Interfaces:
Serializable,Comparable<Parser.Pragma>,java.lang.constant.Constable
Enumeration of local pragmatic modifiers of parsing behavior.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSpecifies that given parsers are asserted to have mutually exclusive predictors.Specifies that a preferred alternative should be taken if predicted by the next token, and others ignored.Specifies that given parsers are asserted not to succeed without consuming any input tokens.Specifies that given parsers are asserted to be combined in a way such that they can actually succeed for some input. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionexcludeFrom(Parser.Pragma... pragmas) Returns a modified copy of a given array of pragmas that excludes this pragma.booleanisOneOf(Parser.Pragma... pragmas) Checks whether this pragma is included in the given array.booleanisOneOf(Collection<Parser.Pragma> pragmas) Checks whether this pragma is included in the given collection.booleanisOneOf(Collection<Parser.Pragma> globalPragmas, Parser.Pragma... localPragmas) static Parser.PragmaReturns the enum constant of this class with the specified name.static Parser.Pragma[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Greedy
Specifies that a preferred alternative should be taken if predicted by the next token, and others ignored. -
Productive
Specifies that given parsers are asserted not to succeed without consuming any input tokens. -
Disjoint
Specifies that given parsers are asserted to have mutually exclusive predictors. -
Reachable
Specifies that given parsers are asserted to be combined in a way such that they can actually succeed for some input.
-
-
Field Details
-
EMPTY_ARRAY
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isOneOf
Checks whether this pragma is included in the given array.- Parameters:
pragmas- an array of pragmas- Returns:
trueif the arraypragmashas an element that is identical tothis,falseotherwise- Throws:
NullPointerException- ifpragmasis null
-
isOneOf
Checks whether this pragma is included in the given collection.- Parameters:
pragmas- a collection of pragmas- Returns:
trueif the arraypragmashas an element that is identical tothis,falseotherwise- Throws:
NullPointerException- ifpragmasis null
-
isOneOf
-
excludeFrom
Returns a modified copy of a given array of pragmas that excludes this pragma.- Parameters:
pragmas- an array of pragmas- Returns:
- an array of pragmas that contains all elements of
pragmasthat are not identical tothis - Throws:
NullPointerException- ifpragmasis null
-