aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/description.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/spec/description.go b/spec/description.go
index d2b6d3b..08b037e 100644
--- a/spec/description.go
+++ b/spec/description.go
@@ -1,11 +1,13 @@
package spec
type Terminal struct {
- Number int `json:"number"`
- Name string `json:"name"`
- Anonymous bool `json:"anonymous"`
- Alias string `json:"alias"`
- Pattern string `json:"pattern"`
+ Number int `json:"number"`
+ Name string `json:"name"`
+ Anonymous bool `json:"anonymous"`
+ Alias string `json:"alias"`
+ Pattern string `json:"pattern"`
+ Precedence int `json:"prec"`
+ Associativity string `json:"assoc"`
}
type NonTerminal struct {
@@ -14,9 +16,11 @@ type NonTerminal struct {
}
type Production struct {
- Number int `json:"number"`
- LHS int `json:"lhs"`
- RHS []int `json:"rhs"`
+ Number int `json:"number"`
+ LHS int `json:"lhs"`
+ RHS []int `json:"rhs"`
+ Precedence int `json:"prec"`
+ Associativity string `json:"assoc"`
}
type Item struct {