-
Notifications
You must be signed in to change notification settings - Fork 0
Literal
xtay2 edited this page Feb 16, 2023
·
7 revisions
The Literal represents a terminal string in an EBNF which is a symbol that cannot be further decomposed into smaller sections. To initialise it, call the constructor with a literal String. It gets used for all kinds of symbols and keywords.
-
Literal(String literal): Strips the literal and rejects blank ones.
new Literal("abc");Matches
"abc"
" abc "
" abc"Fails
"ab c"
"ab"
"Hello"