aboutsummaryrefslogtreecommitdiff
path: root/spec/description.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-05-27 02:11:39 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-05-27 02:25:50 +0900
commit4c0f7eb15db566a19eb753e6ffc3a2354078f5fc (patch)
treef3956aa60561ede7d6ccfb288eabfd47de60ffe4 /spec/description.go
parentAllows a directory to be specified as the --output option for the vartan-comp... (diff)
downloadcotia-4c0f7eb15db566a19eb753e6ffc3a2354078f5fc.tar.gz
cotia-4c0f7eb15db566a19eb753e6ffc3a2354078f5fc.tar.xz
Rename spec package to spec/grammar package
Diffstat (limited to 'spec/description.go')
-rw-r--r--spec/description.go73
1 files changed, 0 insertions, 73 deletions
diff --git a/spec/description.go b/spec/description.go
deleted file mode 100644
index 552840a..0000000
--- a/spec/description.go
+++ /dev/null
@@ -1,73 +0,0 @@
-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"`
- Precedence int `json:"prec"`
- Associativity string `json:"assoc"`
-}
-
-type NonTerminal struct {
- Number int `json:"number"`
- Name string `json:"name"`
-}
-
-type Production struct {
- Number int `json:"number"`
- LHS int `json:"lhs"`
- RHS []int `json:"rhs"`
- Precedence int `json:"prec"`
- Associativity string `json:"assoc"`
-}
-
-type Item struct {
- Production int `json:"production"`
- Dot int `json:"dot"`
-}
-
-type Transition struct {
- Symbol int `json:"symbol"`
- State int `json:"state"`
-}
-
-type Reduce struct {
- LookAhead []int `json:"look_ahead"`
- Production int `json:"production"`
-}
-
-type SRConflict struct {
- Symbol int `json:"symbol"`
- State int `json:"state"`
- Production int `json:"production"`
- AdoptedState *int `json:"adopted_state"`
- AdoptedProduction *int `json:"adopted_production"`
- ResolvedBy int `json:"resolved_by"`
-}
-
-type RRConflict struct {
- Symbol int `json:"symbol"`
- Production1 int `json:"production_1"`
- Production2 int `json:"production_2"`
- AdoptedProduction int `json:"adopted_production"`
- ResolvedBy int `json:"resolved_by"`
-}
-
-type State struct {
- Number int `json:"number"`
- Kernel []*Item `json:"kernel"`
- Shift []*Transition `json:"shift"`
- Reduce []*Reduce `json:"reduce"`
- GoTo []*Transition `json:"goto"`
- SRConflict []*SRConflict `json:"sr_conflict"`
- RRConflict []*RRConflict `json:"rr_conflict"`
-}
-
-type Report struct {
- Terminals []*Terminal `json:"terminals"`
- NonTerminals []*NonTerminal `json:"non_terminals"`
- Productions []*Production `json:"productions"`
- States []*State `json:"states"`
-}