feat: Implement Chapter9
Also provides proper associativity on the operators, to avoid ambiguous parses. This completes all of the examples in the Spoofax Tutorial/Reference that use the propositional signature.
This commit is contained in:
parent
fddc94a906
commit
ba130ecb0f
17 changed files with 402 additions and 25 deletions
|
@ -34,10 +34,10 @@ context-free syntax
|
|||
Prop.False = <0>
|
||||
Prop.Atom = String
|
||||
Prop.Not = <!<Prop>>
|
||||
Prop.And = <<Prop> & <Prop>>
|
||||
Prop.Or = <<Prop> | <Prop>>
|
||||
Prop.Impl = [[Prop] -> [Prop]]
|
||||
Prop.Eq = <<Prop> = <Prop>>
|
||||
Prop.And = <<Prop> & <Prop>> {left}
|
||||
Prop.Or = <<Prop> | <Prop>> {left}
|
||||
Prop.Impl = [[Prop] -> [Prop]] {right}
|
||||
Prop.Eq = <<Prop> = <Prop>> {non-assoc}
|
||||
Prop = <(<Prop>)> {bracket}
|
||||
|
||||
String = ID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue