diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-06-28 01:25:54 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-06-28 02:59:34 +0900 |
commit | f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f (patch) | |
tree | d7c34a9521e130c6181e96d904fc02ef922e5991 /spec/grammar.go | |
parent | Add syntax of fragment (diff) | |
download | urubu-f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f.tar.gz urubu-f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f.tar.xz |
Add ast action
Diffstat (limited to 'spec/grammar.go')
-rw-r--r-- | spec/grammar.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/grammar.go b/spec/grammar.go index 44ef3ee..625b6c2 100644 --- a/spec/grammar.go +++ b/spec/grammar.go @@ -5,6 +5,7 @@ import mlspec "github.com/nihei9/maleeni/spec" type CompiledGrammar struct { LexicalSpecification *LexicalSpecification `json:"lexical_specification"` ParsingTable *ParsingTable `json:"parsing_table"` + ASTAction *ASTAction `json:"ast_action"` } type LexicalSpecification struct { @@ -32,3 +33,7 @@ type ParsingTable struct { NonTerminalCount int `json:"non_terminal_count"` EOFSymbol int `json:"eof_symbol"` } + +type ASTAction struct { + Entries [][]int `json:"entries"` +} |