-
Notifications
You must be signed in to change notification settings - Fork 0
Unordered
xtay2 edited this page Mar 15, 2023
·
2 revisions
This non-terminal tries to match all passed rules in no specific order.
-
Unordered(String... literals)
: Maps the passed strings to literals. -
Unordered(Rule... rules)
: Takes atleast 2 rules. -
Unordered(Function<Set<Token>, TokenSet> tokenFactory, String... literals)
: Like the string-constructor but takes an additional factory-method to produce a token instance. -
Unordered(Function<Set<Token>, TokenSet> tokenFactory, Rule... rules)
: Like the default-constructor but takes an additional factory-method to produce a token instance.
new Unordered("public", "static", "final");
Matches
"public static final"
"publicfinalstatic"
"final publicstatic"
Fails
"public static"
"public public static final"