-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix strings and conditions redefinition and grammar
- Loading branch information
1 parent
22eedaf
commit 9623d2b
Showing
3 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
SOURCE -> RULE | eps. | ||
RULE -> rule identifier lbrace RULEBODY rbrace. | ||
RULEBODY -> STRINGS RULEBODY | CONDITION RULEBODY | eps. | ||
RULEBODY -> STRINGS CONDITION | CONDITION . | ||
STRINGS -> string colon STRINGSBODY. | ||
CONDITION -> condition colon CONDITIONBODY. | ||
STRINGSBODY -> variable assign string STRINGSBODY | eps. | ||
CONDITIONBODY -> LITERAL CONDITIONBODY | OPERATOR CONDITIONBODY | eps. | ||
CONDITIONBODY -> LITERAL EXPRESSION | OPERATOR EXPRESSION . | ||
EXPRESSION -> LITERAL EXPRESSION | OPERATOR EXPRESSION | eps. | ||
LITERAL -> variable | BOOLEAN. | ||
BOOLEAN -> true | false. | ||
OPERATOR -> and | or | not. | ||
|
||
// https://smlweb.cpsc.ucalgary.ca/vital-stats.php?grammar=SOURCE+-%3E+RULE+%7C+eps.%0D%0ARULE+-%3E+rule+identifier+lbrace+RULEBODY+rbrace.%0D%0ARULEBODY+-%3E+STRINGS+%7C+CONDITION+%7C+eps.%0D%0ASTRINGS+-%3E+string+colon+STRINGSBODY.%0D%0ACONDITION+-%3E+condition+colon+CONDITIONBODY.%0D%0ASTRINGSBODY+-%3E+variable+assign+string+STRINGSBODY+%7C+eps.%0D%0ACONDITIONBODY+-%3E+LITERAL+EXPRESSION+%7C+OPERATOR+EXPRESSION+%7C+eps.%0D%0ALITERAL+-%3E+variable+%7C+BOOLEAN.%0D%0ABOOLEAN+-%3E+true+%7C+false.%0D%0AOPERATOR+-%3E+and+%7C+or+%7C+not. | ||
// https://smlweb.cpsc.ucalgary.ca/vital-stats.php?grammar=SOURCE+-%3E+RULE+%7C+eps.%0D%0ARULE+-%3E+rule+identifier+lbrace+RULEBODY+rbrace.%0D%0ARULEBODY+-%3E+STRINGS+CONDITION+%7C+CONDITION+.%0D%0ASTRINGS+-%3E+string+colon+STRINGSBODY.%0D%0ACONDITION+-%3E+condition+colon+CONDITIONBODY.%0D%0ASTRINGSBODY+-%3E+variable+assign+string+STRINGSBODY+%7C+eps.%0D%0ACONDITIONBODY+-%3E+LITERAL+EXPRESSION+%7C+OPERATOR+EXPRESSION+.%0D%0AEXPRESSION+-%3E+LITERAL+EXPRESSION+%7C+OPERATOR+EXPRESSION+%7C+eps.%0D%0ALITERAL+-%3E+variable+%7C+BOOLEAN.%0D%0ABOOLEAN+-%3E+true+%7C+false.%0D%0AOPERATOR+-%3E+and+%7C+or+%7C+not. |