Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions rusty_lr_parser/src/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ impl Grammar {
/// states
pub states: Vec<#state_typename>,
}
#[rustfmt::skip]
impl #module_prefix::parser::Parser for #parser_struct_name {
type Term = #token_typename;
type TermClass = #termclass_typename;
Expand All @@ -889,6 +890,7 @@ impl Grammar {
}

/// A struct that holds the whole parser table.
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
impl #parser_struct_name {
/// Calculates the states and parser tables from the grammar.
Expand Down Expand Up @@ -1656,6 +1658,7 @@ impl Grammar {
}
quote! {
/// tag for token that represents which stack a token is using
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum #tag_enum_name {
Expand Down Expand Up @@ -1706,6 +1709,7 @@ impl Grammar {
#tag_definition_stream

/// enum for each non-terminal and terminal symbol, that actually hold data
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
#derive_clone_for_glr
pub struct #data_stack_typename {
Expand All @@ -1722,12 +1726,14 @@ impl Grammar {
}
}

#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut, dead_code)]
impl #data_stack_typename {
#fn_reduce_for_each_rule_stream
}


#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types, unused_variables)]
impl #module_prefix::parser::data_stack::DataStack for #data_stack_typename {
type Term = #token_typename;
Expand Down
6 changes: 6 additions & 0 deletions rusty_lr_parser/src/parser/parser_expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ impl ::rusty_lr_core::parser::nonterminal::NonTerminal for GrammarNonTerminals {
}
}
/// tag for token that represents which stack a token is using
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum GrammarTags {
Expand All @@ -637,6 +638,7 @@ pub enum GrammarTags {
Empty,
}
/// enum for each non-terminal and terminal symbol, that actually hold data
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
pub struct GrammarDataStack {
pub __tags: Vec<GrammarTags>,
Expand Down Expand Up @@ -686,6 +688,7 @@ impl Default for GrammarDataStack {
}
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -5209,6 +5212,7 @@ impl GrammarDataStack {
Ok(())
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -6669,6 +6673,7 @@ pub struct GrammarParser {
/// states
pub states: Vec<GrammarState>,
}
#[rustfmt::skip]
impl ::rusty_lr_core::parser::Parser for GrammarParser {
type Term = Lexed;
type TermClass = GrammarTerminalClasses;
Expand All @@ -6690,6 +6695,7 @@ impl ::rusty_lr_core::parser::Parser for GrammarParser {
}
}
/// A struct that holds the whole parser table.
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
impl GrammarParser {
/// Calculates the states and parser tables from the grammar.
Expand Down
6 changes: 6 additions & 0 deletions scripts/diff/calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ impl ::rusty_lr::parser::nonterminal::NonTerminal for ENonTerminals {
}
}
/// tag for token that represents which stack a token is using
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum ETags {
Expand All @@ -202,6 +203,7 @@ pub enum ETags {
Empty,
}
/// enum for each non-terminal and terminal symbol, that actually hold data
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
pub struct EDataStack {
pub __tags: Vec<ETags>,
Expand All @@ -217,6 +219,7 @@ impl Default for EDataStack {
}
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -471,6 +474,7 @@ impl EDataStack {
Ok(())
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -639,6 +643,7 @@ pub struct EParser {
/// states
pub states: Vec<EState>,
}
#[rustfmt::skip]
impl ::rusty_lr::parser::Parser for EParser {
type Term = Token;
type TermClass = ETerminalClasses;
Expand All @@ -660,6 +665,7 @@ impl ::rusty_lr::parser::Parser for EParser {
}
}
/// A struct that holds the whole parser table.
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
impl EParser {
/// Calculates the states and parser tables from the grammar.
Expand Down
6 changes: 6 additions & 0 deletions scripts/diff/calculator_u8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ impl ::rusty_lr::parser::nonterminal::NonTerminal for ENonTerminals {
}
}
/// tag for token that represents which stack a token is using
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
#[derive(Clone, Copy, PartialEq, Eq)]
pub enum ETags {
Expand All @@ -233,6 +234,7 @@ pub enum ETags {
Empty,
}
/// enum for each non-terminal and terminal symbol, that actually hold data
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
pub struct EDataStack {
pub __tags: Vec<ETags>,
Expand All @@ -252,6 +254,7 @@ impl Default for EDataStack {
}
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -635,6 +638,7 @@ impl EDataStack {
Ok(())
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -878,6 +882,7 @@ pub struct EParser {
/// states
pub states: Vec<EState>,
}
#[rustfmt::skip]
impl ::rusty_lr::parser::Parser for EParser {
type Term = char;
type TermClass = ETerminalClasses;
Expand All @@ -899,6 +904,7 @@ impl ::rusty_lr::parser::Parser for EParser {
}
}
/// A struct that holds the whole parser table.
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
impl EParser {
/// Calculates the states and parser tables from the grammar.
Expand Down
5 changes: 5 additions & 0 deletions scripts/diff/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,15 @@ impl ::rusty_lr::parser::nonterminal::NonTerminal for JsonNonTerminals {
}
}
/// enum for each non-terminal and terminal symbol, that actually hold data
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, non_snake_case, non_camel_case_types)]
pub struct JsonDataStack {}
impl Default for JsonDataStack {
fn default() -> Self {
Self {}
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -1028,6 +1030,7 @@ impl JsonDataStack {
Ok(())
}
}
#[rustfmt::skip]
#[allow(
unused_braces,
unused_parens,
Expand Down Expand Up @@ -1456,6 +1459,7 @@ pub struct JsonParser {
/// states
pub states: Vec<JsonState>,
}
#[rustfmt::skip]
impl ::rusty_lr::parser::Parser for JsonParser {
type Term = char;
type TermClass = JsonTerminalClasses;
Expand All @@ -1476,6 +1480,7 @@ impl ::rusty_lr::parser::Parser for JsonParser {
}
}
/// A struct that holds the whole parser table.
#[rustfmt::skip]
#[allow(unused_braces, unused_parens, unused_variables, non_snake_case, unused_mut)]
impl JsonParser {
/// Calculates the states and parser tables from the grammar.
Expand Down
Loading