From f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Mon, 28 Jun 2021 01:25:54 +0900 Subject: Add ast action --- spec/grammar.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/grammar.go') 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"` +} -- cgit v1.2.3