#![allow(unused)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(clippy::all)]
use super::prelude::*;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct Program<M>(pub M, pub Vec<SortOrMeta<M>>);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum SortOrMeta<M> {
Meta(M, Meta<M>),
Sort(M, Sort<M>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct Meta<M>(pub M, pub Identifier<M>);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum Sort<M> {
SortDocumented(M, Vec<DocComment<M>>, Box<Sort<M>>),
Sort(
M,
Identifier<M>,
Option<AnnotationList<M>>,
Vec<Constructor<M>>,
),
SortSingle(
M,
Identifier<M>,
Vec<Expression<M>>,
Option<AnnotationList<M>>,
),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct Identifier<M>(pub M, pub std::string::String);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct DocComment<M>(pub M, pub std::string::String);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct AnnotationList<M>(pub M, pub Vec<Annotation<M>>);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum Constructor<M> {
ConstructorDocumented(M, Vec<DocComment<M>>, Box<Constructor<M>>),
Constructor(
M,
Identifier<M>,
Vec<Expression<M>>,
Option<AnnotationList<M>>,
),
ConstructorBare(M, Identifier<M>, Option<AnnotationList<M>>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum Expression<M> {
Star(M, Box<Expression<M>>),
Plus(M, Box<Expression<M>>),
Maybe(M, Box<Expression<M>>),
RepeatExact(M, Box<Expression<M>>, Number<M>),
RepeatRange(M, Box<Expression<M>>, Number<M>, Number<M>),
RepeatLower(M, Box<Expression<M>>, Number<M>),
Delimited(
M,
Box<Expression<M>>,
Box<Expression<M>>,
DelimitedBound<M>,
bool,
),
Literal(M, String<M>),
Paren(M, Vec<Box<Expression<M>>>),
Labelled(M, Identifier<M>, Box<Expression<M>>),
Sort(M, Identifier<M>),
Class(M, CharacterClass<M>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum Annotation<M> {
Injection(M),
NoPrettyPrint(M),
SingleString(M),
NoLayout(M),
Hidden(M),
Error(M, String<M>),
PartOf(M, Identifier<M>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct Number<M>(pub M, pub std::string::String);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum DelimitedBound<M> {
NumNum(M, Number<M>, Number<M>),
NumInf(M, Number<M>),
Num(M, Number<M>),
Star(M),
Plus(M),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum String<M> {
Single(M, Vec<StringChar<M>>),
Double(M, Vec<StringChar<M>>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub struct CharacterClass<M>(pub M, pub bool, pub Vec<CharacterClassItem<M>>);
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum StringChar<M> {
Escaped(M, std::string::String),
Normal(M, std::string::String),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum CharacterClassItem<M> {
Range(M, EscapeClosingBracket<M>, EscapeClosingBracket<M>),
SingleChar(M, EscapeClosingBracket<M>),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum EscapeClosingBracket<M> {
Escaped(M, std::string::String),
Unescaped(M, std::string::String),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(crate = "self::serde")]
pub enum Layout<M> {
Simple(M, std::string::String),
Comment(M, Vec<std::string::String>),
}
pub type AST_ROOT<M> = Program<M>;