#[allow(dead_code)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum NonTerminalKind {
Array,
ArrayBegin,
ArrayElements,
ArrayElementsOpt,
ArrayElementsTail,
ArrayElementsTailOpt,
ArrayEnd,
ArrayMarker,
ArrayMarkerOpt,
ArrayOpt,
At,
Backtick2,
Backtick3,
Backtick4,
Backtick5,
BacktickDelim,
Begin,
Bind,
Binding,
BindingRhs,
BlockBody,
Boolean,
CodeBlock,
CodeBlock3,
CodeBlock3List,
CodeBlock3ListGroup,
CodeBlock4,
CodeBlock4List,
CodeBlock4ListGroup,
CodeBlock5,
CodeBlock5List,
CodeBlock5ListGroup,
CodeBlock6,
CodeBlock6List,
CodeBlock6ListGroup,
CodeBlockEnd3,
CodeBlockEnd4,
CodeBlockEnd5,
CodeBlockEnd6,
CodeBlockStart3,
CodeBlockStart4,
CodeBlockStart5,
CodeBlockStart6,
Comma,
Continue,
DelimCode,
DelimCode1,
DelimCode1List,
DelimCode1ListGroup,
DelimCode2,
DelimCode2List,
DelimCode2ListGroup,
DelimCode3,
DelimCode3List,
DelimCode3ListGroup,
DelimCodeEnd1,
DelimCodeEnd2,
DelimCodeEnd3,
DelimCodeStart1,
DelimCodeStart2,
DelimCodeStart3,
Dot,
DotKey,
End,
Eure,
EureList,
EureList0,
EureOpt,
Ext,
ExtensionNameSpace,
False,
FirstKey,
FlatBody,
FlatBodyList,
FlatRootBinding,
Float,
GrammarNewline,
Hole,
Ident,
Inf,
InlineCode,
InlineCode1,
Integer,
Key,
KeyIdent,
KeyTail,
KeyTuple,
KeyTupleElements,
KeyTupleElementsOpt,
KeyTupleElementsTail,
KeyTupleElementsTailOpt,
KeyTupleOpt,
KeyValue,
Keys,
KeysList,
LParen,
LitStr,
LitStr1,
LitStr1End,
LitStr1List,
LitStr1ListGroup,
LitStr1Start,
LitStr2,
LitStr2End,
LitStr2List,
LitStr2ListGroup,
LitStr2Start,
LitStr3,
LitStr3End,
LitStr3List,
LitStr3ListGroup,
LitStr3Start,
MapBind,
NaN,
NewlineBind,
NewlineHead,
NewlineHeadOpt,
NewlineTextStart,
NoBacktick,
NoSQuote,
Null,
Number,
Object,
ObjectList,
ObjectOpt,
ObjectOpt0,
ObjectOpt1,
RParen,
RootBinding,
RootTextBinding,
RootTextBindingOpt,
RootTextBindingOpt0,
RootTextBindingOpt1,
RootValueBinding,
SQuote,
Section,
SectionBinding,
SectionBody,
SectionBodyOpt,
SectionHead,
Str,
String,
Strings,
StringsList,
Text,
TextBinding,
TextBindingOpt,
TextBindingOpt0,
TextBindingOpt1,
TextStart,
TopLevelBinding,
True,
Tuple,
TupleElements,
TupleElementsOpt,
TupleElementsTail,
TupleElementsTailOpt,
TupleIndex,
TupleOpt,
Value,
ValueBinding,
Ws,
Root,
}
#[allow(dead_code)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum TerminalKind {
NewLine,
Whitespace,
LineComment,
BlockComment,
Hash,
MapBind,
Integer,
Float,
Inf,
NaN,
True,
False,
Null,
Hole,
Str,
LitStr,
Text,
InlineCode1,
LitStr3Start,
LitStr2Start,
LitStr1Start,
DelimCodeStart3,
DelimCodeStart2,
DelimCodeStart1,
CodeBlockStart3,
CodeBlockStart4,
CodeBlockStart5,
CodeBlockStart6,
CodeBlockEnd3,
Backtick2,
CodeBlockEnd4,
Backtick3,
CodeBlockEnd5,
Backtick4,
CodeBlockEnd6,
Backtick5,
NoBacktick,
LitStr3End,
LitStr2End,
LitStr1End,
SQuote,
NoSQuote,
DelimCodeEnd3,
DelimCodeEnd2,
DelimCodeEnd1,
BacktickDelim,
GrammarNewline,
Ws,
At,
Dollar,
Dot,
LBrace,
RBrace,
LBracket,
RBracket,
LParen,
RParen,
NewlineBind,
Bind,
Comma,
Esc,
NewlineTextStart,
TextStart,
Ident,
}
#[allow(dead_code)]
impl TerminalKind {
pub fn from_terminal_index(index: u16) -> Self {
match index {
1 => Self::NewLine,
2 => Self::Whitespace,
3 => Self::LineComment,
4 => Self::BlockComment,
5 => Self::Hash,
6 => Self::MapBind,
7 => Self::Integer,
8 => Self::Float,
9 => Self::Inf,
10 => Self::NaN,
11 => Self::True,
12 => Self::False,
13 => Self::Null,
14 => Self::Hole,
15 => Self::Str,
16 => Self::LitStr,
17 => Self::Text,
18 => Self::InlineCode1,
19 => Self::LitStr3Start,
20 => Self::LitStr2Start,
21 => Self::LitStr1Start,
22 => Self::DelimCodeStart3,
23 => Self::DelimCodeStart2,
24 => Self::DelimCodeStart1,
25 => Self::CodeBlockStart3,
26 => Self::CodeBlockStart4,
27 => Self::CodeBlockStart5,
28 => Self::CodeBlockStart6,
29 => Self::CodeBlockEnd3,
30 => Self::Backtick2,
31 => Self::CodeBlockEnd4,
32 => Self::Backtick3,
33 => Self::CodeBlockEnd5,
34 => Self::Backtick4,
35 => Self::CodeBlockEnd6,
36 => Self::Backtick5,
37 => Self::NoBacktick,
38 => Self::LitStr3End,
39 => Self::LitStr2End,
40 => Self::LitStr1End,
41 => Self::SQuote,
42 => Self::NoSQuote,
43 => Self::DelimCodeEnd3,
44 => Self::DelimCodeEnd2,
45 => Self::DelimCodeEnd1,
46 => Self::BacktickDelim,
47 => Self::GrammarNewline,
48 => Self::Ws,
49 => Self::At,
50 => Self::Dollar,
51 => Self::Dot,
52 => Self::LBrace,
53 => Self::RBrace,
54 => Self::LBracket,
55 => Self::RBracket,
56 => Self::LParen,
57 => Self::RParen,
58 => Self::NewlineBind,
59 => Self::Bind,
60 => Self::Comma,
61 => Self::Esc,
62 => Self::NewlineTextStart,
63 => Self::TextStart,
64 => Self::Ident,
_ => panic!("Invalid terminal index: {}", index),
}
}
pub fn is_builtin_terminal(&self) -> bool {
matches!(
self,
TerminalKind::NewLine
| TerminalKind::Whitespace
| TerminalKind::LineComment
| TerminalKind::BlockComment
)
}
pub fn is_builtin_new_line(&self) -> bool {
matches!(self, TerminalKind::NewLine)
}
pub fn is_builtin_whitespace(&self) -> bool {
matches!(self, TerminalKind::Whitespace)
}
pub fn is_builtin_line_comment(&self) -> bool {
matches!(self, TerminalKind::LineComment)
}
pub fn is_builtin_block_comment(&self) -> bool {
matches!(self, TerminalKind::BlockComment)
}
}
#[allow(dead_code)]
impl NonTerminalKind {
pub fn from_non_terminal_name(name: &str) -> Self {
match name {
"Array" => Self::Array,
"ArrayBegin" => Self::ArrayBegin,
"ArrayElements" => Self::ArrayElements,
"ArrayElementsOpt" => Self::ArrayElementsOpt,
"ArrayElementsTail" => Self::ArrayElementsTail,
"ArrayElementsTailOpt" => Self::ArrayElementsTailOpt,
"ArrayEnd" => Self::ArrayEnd,
"ArrayMarker" => Self::ArrayMarker,
"ArrayMarkerOpt" => Self::ArrayMarkerOpt,
"ArrayOpt" => Self::ArrayOpt,
"At" => Self::At,
"Backtick2" => Self::Backtick2,
"Backtick3" => Self::Backtick3,
"Backtick4" => Self::Backtick4,
"Backtick5" => Self::Backtick5,
"BacktickDelim" => Self::BacktickDelim,
"Begin" => Self::Begin,
"Bind" => Self::Bind,
"Binding" => Self::Binding,
"BindingRhs" => Self::BindingRhs,
"BlockBody" => Self::BlockBody,
"Boolean" => Self::Boolean,
"CodeBlock" => Self::CodeBlock,
"CodeBlock3" => Self::CodeBlock3,
"CodeBlock3List" => Self::CodeBlock3List,
"CodeBlock3ListGroup" => Self::CodeBlock3ListGroup,
"CodeBlock4" => Self::CodeBlock4,
"CodeBlock4List" => Self::CodeBlock4List,
"CodeBlock4ListGroup" => Self::CodeBlock4ListGroup,
"CodeBlock5" => Self::CodeBlock5,
"CodeBlock5List" => Self::CodeBlock5List,
"CodeBlock5ListGroup" => Self::CodeBlock5ListGroup,
"CodeBlock6" => Self::CodeBlock6,
"CodeBlock6List" => Self::CodeBlock6List,
"CodeBlock6ListGroup" => Self::CodeBlock6ListGroup,
"CodeBlockEnd3" => Self::CodeBlockEnd3,
"CodeBlockEnd4" => Self::CodeBlockEnd4,
"CodeBlockEnd5" => Self::CodeBlockEnd5,
"CodeBlockEnd6" => Self::CodeBlockEnd6,
"CodeBlockStart3" => Self::CodeBlockStart3,
"CodeBlockStart4" => Self::CodeBlockStart4,
"CodeBlockStart5" => Self::CodeBlockStart5,
"CodeBlockStart6" => Self::CodeBlockStart6,
"Comma" => Self::Comma,
"Continue" => Self::Continue,
"DelimCode" => Self::DelimCode,
"DelimCode1" => Self::DelimCode1,
"DelimCode1List" => Self::DelimCode1List,
"DelimCode1ListGroup" => Self::DelimCode1ListGroup,
"DelimCode2" => Self::DelimCode2,
"DelimCode2List" => Self::DelimCode2List,
"DelimCode2ListGroup" => Self::DelimCode2ListGroup,
"DelimCode3" => Self::DelimCode3,
"DelimCode3List" => Self::DelimCode3List,
"DelimCode3ListGroup" => Self::DelimCode3ListGroup,
"DelimCodeEnd1" => Self::DelimCodeEnd1,
"DelimCodeEnd2" => Self::DelimCodeEnd2,
"DelimCodeEnd3" => Self::DelimCodeEnd3,
"DelimCodeStart1" => Self::DelimCodeStart1,
"DelimCodeStart2" => Self::DelimCodeStart2,
"DelimCodeStart3" => Self::DelimCodeStart3,
"Dot" => Self::Dot,
"DotKey" => Self::DotKey,
"End" => Self::End,
"Eure" => Self::Eure,
"EureList" => Self::EureList,
"EureList0" => Self::EureList0,
"EureOpt" => Self::EureOpt,
"Ext" => Self::Ext,
"ExtensionNameSpace" => Self::ExtensionNameSpace,
"False" => Self::False,
"FirstKey" => Self::FirstKey,
"FlatBody" => Self::FlatBody,
"FlatBodyList" => Self::FlatBodyList,
"FlatRootBinding" => Self::FlatRootBinding,
"Float" => Self::Float,
"GrammarNewline" => Self::GrammarNewline,
"Hole" => Self::Hole,
"Ident" => Self::Ident,
"Inf" => Self::Inf,
"InlineCode" => Self::InlineCode,
"InlineCode1" => Self::InlineCode1,
"Integer" => Self::Integer,
"Key" => Self::Key,
"KeyIdent" => Self::KeyIdent,
"KeyTail" => Self::KeyTail,
"KeyTuple" => Self::KeyTuple,
"KeyTupleElements" => Self::KeyTupleElements,
"KeyTupleElementsOpt" => Self::KeyTupleElementsOpt,
"KeyTupleElementsTail" => Self::KeyTupleElementsTail,
"KeyTupleElementsTailOpt" => Self::KeyTupleElementsTailOpt,
"KeyTupleOpt" => Self::KeyTupleOpt,
"KeyValue" => Self::KeyValue,
"Keys" => Self::Keys,
"KeysList" => Self::KeysList,
"LParen" => Self::LParen,
"LitStr" => Self::LitStr,
"LitStr1" => Self::LitStr1,
"LitStr1End" => Self::LitStr1End,
"LitStr1List" => Self::LitStr1List,
"LitStr1ListGroup" => Self::LitStr1ListGroup,
"LitStr1Start" => Self::LitStr1Start,
"LitStr2" => Self::LitStr2,
"LitStr2End" => Self::LitStr2End,
"LitStr2List" => Self::LitStr2List,
"LitStr2ListGroup" => Self::LitStr2ListGroup,
"LitStr2Start" => Self::LitStr2Start,
"LitStr3" => Self::LitStr3,
"LitStr3End" => Self::LitStr3End,
"LitStr3List" => Self::LitStr3List,
"LitStr3ListGroup" => Self::LitStr3ListGroup,
"LitStr3Start" => Self::LitStr3Start,
"MapBind" => Self::MapBind,
"NaN" => Self::NaN,
"NewlineBind" => Self::NewlineBind,
"NewlineHead" => Self::NewlineHead,
"NewlineHeadOpt" => Self::NewlineHeadOpt,
"NewlineTextStart" => Self::NewlineTextStart,
"NoBacktick" => Self::NoBacktick,
"NoSQuote" => Self::NoSQuote,
"Null" => Self::Null,
"Number" => Self::Number,
"Object" => Self::Object,
"ObjectList" => Self::ObjectList,
"ObjectOpt" => Self::ObjectOpt,
"ObjectOpt0" => Self::ObjectOpt0,
"ObjectOpt1" => Self::ObjectOpt1,
"RParen" => Self::RParen,
"RootBinding" => Self::RootBinding,
"RootTextBinding" => Self::RootTextBinding,
"RootTextBindingOpt" => Self::RootTextBindingOpt,
"RootTextBindingOpt0" => Self::RootTextBindingOpt0,
"RootTextBindingOpt1" => Self::RootTextBindingOpt1,
"RootValueBinding" => Self::RootValueBinding,
"SQuote" => Self::SQuote,
"Section" => Self::Section,
"SectionBinding" => Self::SectionBinding,
"SectionBody" => Self::SectionBody,
"SectionBodyOpt" => Self::SectionBodyOpt,
"SectionHead" => Self::SectionHead,
"Str" => Self::Str,
"String" => Self::String,
"Strings" => Self::Strings,
"StringsList" => Self::StringsList,
"Text" => Self::Text,
"TextBinding" => Self::TextBinding,
"TextBindingOpt" => Self::TextBindingOpt,
"TextBindingOpt0" => Self::TextBindingOpt0,
"TextBindingOpt1" => Self::TextBindingOpt1,
"TextStart" => Self::TextStart,
"TopLevelBinding" => Self::TopLevelBinding,
"True" => Self::True,
"Tuple" => Self::Tuple,
"TupleElements" => Self::TupleElements,
"TupleElementsOpt" => Self::TupleElementsOpt,
"TupleElementsTail" => Self::TupleElementsTail,
"TupleElementsTailOpt" => Self::TupleElementsTailOpt,
"TupleIndex" => Self::TupleIndex,
"TupleOpt" => Self::TupleOpt,
"Value" => Self::Value,
"ValueBinding" => Self::ValueBinding,
"Ws" => Self::Ws,
"" => Self::Root,
_ => panic!("Invalid non-terminal name: {}", name),
}
}
}
impl std::fmt::Display for TerminalKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::NewLine => write!(f, stringify!(NewLine)),
Self::Whitespace => write!(f, stringify!(Whitespace)),
Self::LineComment => write!(f, stringify!(LineComment)),
Self::BlockComment => write!(f, stringify!(BlockComment)),
Self::Hash => write!(f, stringify!(Hash)),
Self::MapBind => write!(f, stringify!(MapBind)),
Self::Integer => write!(f, stringify!(Integer)),
Self::Float => write!(f, stringify!(Float)),
Self::Inf => write!(f, stringify!(Inf)),
Self::NaN => write!(f, stringify!(NaN)),
Self::True => write!(f, stringify!(True)),
Self::False => write!(f, stringify!(False)),
Self::Null => write!(f, stringify!(Null)),
Self::Hole => write!(f, stringify!(Hole)),
Self::Str => write!(f, stringify!(Str)),
Self::LitStr => write!(f, stringify!(LitStr)),
Self::Text => write!(f, stringify!(Text)),
Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
Self::LitStr3Start => write!(f, stringify!(LitStr3Start)),
Self::LitStr2Start => write!(f, stringify!(LitStr2Start)),
Self::LitStr1Start => write!(f, stringify!(LitStr1Start)),
Self::DelimCodeStart3 => write!(f, stringify!(DelimCodeStart3)),
Self::DelimCodeStart2 => write!(f, stringify!(DelimCodeStart2)),
Self::DelimCodeStart1 => write!(f, stringify!(DelimCodeStart1)),
Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
Self::Backtick2 => write!(f, stringify!(Backtick2)),
Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
Self::Backtick3 => write!(f, stringify!(Backtick3)),
Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
Self::Backtick4 => write!(f, stringify!(Backtick4)),
Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
Self::Backtick5 => write!(f, stringify!(Backtick5)),
Self::NoBacktick => write!(f, stringify!(NoBacktick)),
Self::LitStr3End => write!(f, stringify!(LitStr3End)),
Self::LitStr2End => write!(f, stringify!(LitStr2End)),
Self::LitStr1End => write!(f, stringify!(LitStr1End)),
Self::SQuote => write!(f, stringify!(SQuote)),
Self::NoSQuote => write!(f, stringify!(NoSQuote)),
Self::DelimCodeEnd3 => write!(f, stringify!(DelimCodeEnd3)),
Self::DelimCodeEnd2 => write!(f, stringify!(DelimCodeEnd2)),
Self::DelimCodeEnd1 => write!(f, stringify!(DelimCodeEnd1)),
Self::BacktickDelim => write!(f, stringify!(BacktickDelim)),
Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
Self::Ws => write!(f, stringify!(Ws)),
Self::At => write!(f, stringify!(At)),
Self::Dollar => write!(f, stringify!(Dollar)),
Self::Dot => write!(f, stringify!(Dot)),
Self::LBrace => write!(f, stringify!(LBrace)),
Self::RBrace => write!(f, stringify!(RBrace)),
Self::LBracket => write!(f, stringify!(LBracket)),
Self::RBracket => write!(f, stringify!(RBracket)),
Self::LParen => write!(f, stringify!(LParen)),
Self::RParen => write!(f, stringify!(RParen)),
Self::NewlineBind => write!(f, stringify!(NewlineBind)),
Self::Bind => write!(f, stringify!(Bind)),
Self::Comma => write!(f, stringify!(Comma)),
Self::Esc => write!(f, stringify!(Esc)),
Self::NewlineTextStart => write!(f, stringify!(NewlineTextStart)),
Self::TextStart => write!(f, stringify!(TextStart)),
Self::Ident => write!(f, stringify!(Ident)),
}
}
}
impl std::fmt::Display for NonTerminalKind {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Array => write!(f, stringify!(Array)),
Self::ArrayBegin => write!(f, stringify!(ArrayBegin)),
Self::ArrayElements => write!(f, stringify!(ArrayElements)),
Self::ArrayElementsOpt => write!(f, stringify!(ArrayElementsOpt)),
Self::ArrayElementsTail => write!(f, stringify!(ArrayElementsTail)),
Self::ArrayElementsTailOpt => write!(f, stringify!(ArrayElementsTailOpt)),
Self::ArrayEnd => write!(f, stringify!(ArrayEnd)),
Self::ArrayMarker => write!(f, stringify!(ArrayMarker)),
Self::ArrayMarkerOpt => write!(f, stringify!(ArrayMarkerOpt)),
Self::ArrayOpt => write!(f, stringify!(ArrayOpt)),
Self::At => write!(f, stringify!(At)),
Self::Backtick2 => write!(f, stringify!(Backtick2)),
Self::Backtick3 => write!(f, stringify!(Backtick3)),
Self::Backtick4 => write!(f, stringify!(Backtick4)),
Self::Backtick5 => write!(f, stringify!(Backtick5)),
Self::BacktickDelim => write!(f, stringify!(BacktickDelim)),
Self::Begin => write!(f, stringify!(Begin)),
Self::Bind => write!(f, stringify!(Bind)),
Self::Binding => write!(f, stringify!(Binding)),
Self::BindingRhs => write!(f, stringify!(BindingRhs)),
Self::BlockBody => write!(f, stringify!(BlockBody)),
Self::Boolean => write!(f, stringify!(Boolean)),
Self::CodeBlock => write!(f, stringify!(CodeBlock)),
Self::CodeBlock3 => write!(f, stringify!(CodeBlock3)),
Self::CodeBlock3List => write!(f, stringify!(CodeBlock3List)),
Self::CodeBlock3ListGroup => write!(f, stringify!(CodeBlock3ListGroup)),
Self::CodeBlock4 => write!(f, stringify!(CodeBlock4)),
Self::CodeBlock4List => write!(f, stringify!(CodeBlock4List)),
Self::CodeBlock4ListGroup => write!(f, stringify!(CodeBlock4ListGroup)),
Self::CodeBlock5 => write!(f, stringify!(CodeBlock5)),
Self::CodeBlock5List => write!(f, stringify!(CodeBlock5List)),
Self::CodeBlock5ListGroup => write!(f, stringify!(CodeBlock5ListGroup)),
Self::CodeBlock6 => write!(f, stringify!(CodeBlock6)),
Self::CodeBlock6List => write!(f, stringify!(CodeBlock6List)),
Self::CodeBlock6ListGroup => write!(f, stringify!(CodeBlock6ListGroup)),
Self::CodeBlockEnd3 => write!(f, stringify!(CodeBlockEnd3)),
Self::CodeBlockEnd4 => write!(f, stringify!(CodeBlockEnd4)),
Self::CodeBlockEnd5 => write!(f, stringify!(CodeBlockEnd5)),
Self::CodeBlockEnd6 => write!(f, stringify!(CodeBlockEnd6)),
Self::CodeBlockStart3 => write!(f, stringify!(CodeBlockStart3)),
Self::CodeBlockStart4 => write!(f, stringify!(CodeBlockStart4)),
Self::CodeBlockStart5 => write!(f, stringify!(CodeBlockStart5)),
Self::CodeBlockStart6 => write!(f, stringify!(CodeBlockStart6)),
Self::Comma => write!(f, stringify!(Comma)),
Self::Continue => write!(f, stringify!(Continue)),
Self::DelimCode => write!(f, stringify!(DelimCode)),
Self::DelimCode1 => write!(f, stringify!(DelimCode1)),
Self::DelimCode1List => write!(f, stringify!(DelimCode1List)),
Self::DelimCode1ListGroup => write!(f, stringify!(DelimCode1ListGroup)),
Self::DelimCode2 => write!(f, stringify!(DelimCode2)),
Self::DelimCode2List => write!(f, stringify!(DelimCode2List)),
Self::DelimCode2ListGroup => write!(f, stringify!(DelimCode2ListGroup)),
Self::DelimCode3 => write!(f, stringify!(DelimCode3)),
Self::DelimCode3List => write!(f, stringify!(DelimCode3List)),
Self::DelimCode3ListGroup => write!(f, stringify!(DelimCode3ListGroup)),
Self::DelimCodeEnd1 => write!(f, stringify!(DelimCodeEnd1)),
Self::DelimCodeEnd2 => write!(f, stringify!(DelimCodeEnd2)),
Self::DelimCodeEnd3 => write!(f, stringify!(DelimCodeEnd3)),
Self::DelimCodeStart1 => write!(f, stringify!(DelimCodeStart1)),
Self::DelimCodeStart2 => write!(f, stringify!(DelimCodeStart2)),
Self::DelimCodeStart3 => write!(f, stringify!(DelimCodeStart3)),
Self::Dot => write!(f, stringify!(Dot)),
Self::DotKey => write!(f, stringify!(DotKey)),
Self::End => write!(f, stringify!(End)),
Self::Eure => write!(f, stringify!(Eure)),
Self::EureList => write!(f, stringify!(EureList)),
Self::EureList0 => write!(f, stringify!(EureList0)),
Self::EureOpt => write!(f, stringify!(EureOpt)),
Self::Ext => write!(f, stringify!(Ext)),
Self::ExtensionNameSpace => write!(f, stringify!(ExtensionNameSpace)),
Self::False => write!(f, stringify!(False)),
Self::FirstKey => write!(f, stringify!(FirstKey)),
Self::FlatBody => write!(f, stringify!(FlatBody)),
Self::FlatBodyList => write!(f, stringify!(FlatBodyList)),
Self::FlatRootBinding => write!(f, stringify!(FlatRootBinding)),
Self::Float => write!(f, stringify!(Float)),
Self::GrammarNewline => write!(f, stringify!(GrammarNewline)),
Self::Hole => write!(f, stringify!(Hole)),
Self::Ident => write!(f, stringify!(Ident)),
Self::Inf => write!(f, stringify!(Inf)),
Self::InlineCode => write!(f, stringify!(InlineCode)),
Self::InlineCode1 => write!(f, stringify!(InlineCode1)),
Self::Integer => write!(f, stringify!(Integer)),
Self::Key => write!(f, stringify!(Key)),
Self::KeyIdent => write!(f, stringify!(KeyIdent)),
Self::KeyTail => write!(f, stringify!(KeyTail)),
Self::KeyTuple => write!(f, stringify!(KeyTuple)),
Self::KeyTupleElements => write!(f, stringify!(KeyTupleElements)),
Self::KeyTupleElementsOpt => write!(f, stringify!(KeyTupleElementsOpt)),
Self::KeyTupleElementsTail => write!(f, stringify!(KeyTupleElementsTail)),
Self::KeyTupleElementsTailOpt => write!(f, stringify!(KeyTupleElementsTailOpt)),
Self::KeyTupleOpt => write!(f, stringify!(KeyTupleOpt)),
Self::KeyValue => write!(f, stringify!(KeyValue)),
Self::Keys => write!(f, stringify!(Keys)),
Self::KeysList => write!(f, stringify!(KeysList)),
Self::LParen => write!(f, stringify!(LParen)),
Self::LitStr => write!(f, stringify!(LitStr)),
Self::LitStr1 => write!(f, stringify!(LitStr1)),
Self::LitStr1End => write!(f, stringify!(LitStr1End)),
Self::LitStr1List => write!(f, stringify!(LitStr1List)),
Self::LitStr1ListGroup => write!(f, stringify!(LitStr1ListGroup)),
Self::LitStr1Start => write!(f, stringify!(LitStr1Start)),
Self::LitStr2 => write!(f, stringify!(LitStr2)),
Self::LitStr2End => write!(f, stringify!(LitStr2End)),
Self::LitStr2List => write!(f, stringify!(LitStr2List)),
Self::LitStr2ListGroup => write!(f, stringify!(LitStr2ListGroup)),
Self::LitStr2Start => write!(f, stringify!(LitStr2Start)),
Self::LitStr3 => write!(f, stringify!(LitStr3)),
Self::LitStr3End => write!(f, stringify!(LitStr3End)),
Self::LitStr3List => write!(f, stringify!(LitStr3List)),
Self::LitStr3ListGroup => write!(f, stringify!(LitStr3ListGroup)),
Self::LitStr3Start => write!(f, stringify!(LitStr3Start)),
Self::MapBind => write!(f, stringify!(MapBind)),
Self::NaN => write!(f, stringify!(NaN)),
Self::NewlineBind => write!(f, stringify!(NewlineBind)),
Self::NewlineHead => write!(f, stringify!(NewlineHead)),
Self::NewlineHeadOpt => write!(f, stringify!(NewlineHeadOpt)),
Self::NewlineTextStart => write!(f, stringify!(NewlineTextStart)),
Self::NoBacktick => write!(f, stringify!(NoBacktick)),
Self::NoSQuote => write!(f, stringify!(NoSQuote)),
Self::Null => write!(f, stringify!(Null)),
Self::Number => write!(f, stringify!(Number)),
Self::Object => write!(f, stringify!(Object)),
Self::ObjectList => write!(f, stringify!(ObjectList)),
Self::ObjectOpt => write!(f, stringify!(ObjectOpt)),
Self::ObjectOpt0 => write!(f, stringify!(ObjectOpt0)),
Self::ObjectOpt1 => write!(f, stringify!(ObjectOpt1)),
Self::RParen => write!(f, stringify!(RParen)),
Self::RootBinding => write!(f, stringify!(RootBinding)),
Self::RootTextBinding => write!(f, stringify!(RootTextBinding)),
Self::RootTextBindingOpt => write!(f, stringify!(RootTextBindingOpt)),
Self::RootTextBindingOpt0 => write!(f, stringify!(RootTextBindingOpt0)),
Self::RootTextBindingOpt1 => write!(f, stringify!(RootTextBindingOpt1)),
Self::RootValueBinding => write!(f, stringify!(RootValueBinding)),
Self::SQuote => write!(f, stringify!(SQuote)),
Self::Section => write!(f, stringify!(Section)),
Self::SectionBinding => write!(f, stringify!(SectionBinding)),
Self::SectionBody => write!(f, stringify!(SectionBody)),
Self::SectionBodyOpt => write!(f, stringify!(SectionBodyOpt)),
Self::SectionHead => write!(f, stringify!(SectionHead)),
Self::Str => write!(f, stringify!(Str)),
Self::String => write!(f, stringify!(String)),
Self::Strings => write!(f, stringify!(Strings)),
Self::StringsList => write!(f, stringify!(StringsList)),
Self::Text => write!(f, stringify!(Text)),
Self::TextBinding => write!(f, stringify!(TextBinding)),
Self::TextBindingOpt => write!(f, stringify!(TextBindingOpt)),
Self::TextBindingOpt0 => write!(f, stringify!(TextBindingOpt0)),
Self::TextBindingOpt1 => write!(f, stringify!(TextBindingOpt1)),
Self::TextStart => write!(f, stringify!(TextStart)),
Self::TopLevelBinding => write!(f, stringify!(TopLevelBinding)),
Self::True => write!(f, stringify!(True)),
Self::Tuple => write!(f, stringify!(Tuple)),
Self::TupleElements => write!(f, stringify!(TupleElements)),
Self::TupleElementsOpt => write!(f, stringify!(TupleElementsOpt)),
Self::TupleElementsTail => write!(f, stringify!(TupleElementsTail)),
Self::TupleElementsTailOpt => write!(f, stringify!(TupleElementsTailOpt)),
Self::TupleIndex => write!(f, stringify!(TupleIndex)),
Self::TupleOpt => write!(f, stringify!(TupleOpt)),
Self::Value => write!(f, stringify!(Value)),
Self::ValueBinding => write!(f, stringify!(ValueBinding)),
Self::Ws => write!(f, stringify!(Ws)),
Self::Root => write!(f, stringify!(Root)),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum NodeKind<T, Nt> {
Terminal(T),
NonTerminal(Nt),
}