You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
3.0 KiB
Rust

4 years ago
pub mod constants;
pub mod mappings;
4 years ago
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Token {
Operation(Operation),
Misc(Misc),
Relation(Relation),
Logical(Logical),
Grouping(Grouping),
Arrow(Arrow),
Accent(Accent),
Greek(Greek),
Font(FontCommand),
Text(Text),
4 years ago
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
pub enum Text {
Plain(String),
Whitespace,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Operation {
Plus,
Minus,
CDot,
Ast,
Star,
Slash,
Backslash,
Times,
Div,
LTimes,
RTimes,
Bowtie,
Circ,
OPlus,
OTimes,
ODot,
Sum,
Prod,
Wedge,
BidWedge,
Vee,
BigVee,
Cap,
BigCap,
Cup,
BigCup,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Misc {
AsciiFrac,
LatexFrac,
Sub,
4 years ago
Pow,
Sqrt,
Root,
Int,
OInt,
Del,
Grad,
PlusMinus,
EmptySet,
Infty,
Aleph,
Therefore,
Because,
PLDots,
PCDots,
VDots,
DDots,
EPipes,
EQuad,
Angle,
Frown,
Triangle,
Diamond,
Square,
LFloor,
RFloor,
LCeiling,
4 years ago
RCeiling,
Complex,
Natural,
Rational,
Real,
Integer,
AsciiText,
LatexText,
4 years ago
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Relation {
Eq,
Ne,
Lt,
Gt,
Le,
Ge,
Prec,
PrecEq,
Succ,
SuccEq,
In,
NotIn,
SubSet,
SupSet,
SubSetEq,
SupSetEq,
Equiv,
Cong,
Approx,
PropTo,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Logical {
And,
Or,
Not,
Implies,
If,
Iff,
4 years ago
ForAll,
Exists,
Bot,
Top,
VDash,
Models,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Grouping {
RParen,
LParen,
RBrace,
LBrace,
RCurl,
LCurl,
LAngle,
RAngle,
LXPar,
RXPar,
Abs,
Floor,
Ceil,
Norm,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Arrow {
4 years ago
UpArrow,
DownArrow,
RightArrow,
To,
RightArrowTail,
TwoHeadRightArrow,
TwoHeadRightArrowTail,
MapsTo,
LeftArrow,
LeftRightArrow,
BigRightArrow,
BigLeftArrow,
BigLeftRightArrow,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Accent {
4 years ago
Hat,
Overline,
Underline,
Vec,
Dot,
DDot,
OverSet,
UnderSet,
UnderBrace,
OverBrace,
Color,
Cancel,
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum Greek {
Alpha,
Beta,
Gamma,
BigGamma,
Delta,
BigDelta,
Epsilon,
VarEpsilon,
Zeta,
Eta,
Theta,
BigTheta,
VarTheta,
Iota,
Kappa,
Lambda,
BigLambda,
Mu,
Nu,
Xi,
BigXi,
Pi,
BigPi,
Rho,
Sigma,
BigSigma,
Tau,
Upsilon,
Phi,
BigPhi,
VarPhi,
Chi,
Psi,
BigPsi,
4 years ago
Omega,
BigOmega,
4 years ago
}
#[derive(Debug, Clone, PartialOrd, PartialEq)]
4 years ago
pub enum FontCommand {
Big,
BigOutline,
Cursive,
TText,
Fr,
SansSerif,
}