summaryrefslogtreecommitdiff
path: root/grammar.txt
AgeCommit message (Collapse)AuthorFilesLines
2016-05-07Oops, accidentally dropped EXP from prioritiesPeter Wu1-2/+2
2016-05-07grammar: remove EBNF constructsPeter Wu1-5/+16
I guess that this satisfies "A description of the grammar resulting from the transformation to remove EBNF constructs". It does not mention something about the left-associativity and priority rules, that is probably the next step.
2016-05-07Add original grammer for part 4Peter Wu1-0/+30
This grammar looks like SDF[0]. Explanation of some constructs: - "start-symbol" refers to the start symbol (a non-terminal). - Lines below "context-free syntax" refers to the non-terminals. - Lines below "lexical syntax" refers to the terminals. - "context-free priorities" provides disambiguation constructs. Note that the "EXP ::= " part really belongs to each individual operand, so it means something like "A > B > C" (where A, B, C are the unary minus, multiplication and plus expressions respectively). I have no idea why Mark van den Brand chose to use multiple "context-free syntax" and "lexical syntax" groups (if that is appropriate terminology), as far as I can see all such blocks can be merged into one group. Maybe he wanted to emphasize the difference between the left-hand side names? [0]: http://releases.strategoxt.org/strategoxt-manual/unstable/manual/chunk-chapter/tutorial-sdf.html