#[derive(Debug, Clone, PartialEq)]
pub enum Token {
Float(f64),
Str(String),
Name(String),
Label(String),
Arg(u32),
Newline,
DotPS,
DotPE,
Eof,
Lt, Lparen, Rparen, Mult, Plus, Minus, Div, Percent, Caret, Not, AndAnd, OrOr, Ampersand, Comma, Colon, LeftBrack, RightBrack, LeftBrace, RightBrace, Dot, Block, LeftQuote, RightQuote, Eq, ColonEq, PlusEq, MinusEq, MultEq, DivEq, RemEq, EqEq, Neq, Ge, Le, Gt, DotX, DotY,
Kw(Kw),
Corner(Corner),
Param(Param),
Func1(Func1),
Func2(Func2),
LineType(LineType),
TextPos(TextPos),
Arrow(Arrow),
Dir(Dir),
Prim(Prim),
Color(Color),
EnvVar(EnvVar),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Kw {
Ht,
Wid,
Rad,
Diam,
Thick,
Scaled,
From,
To,
At,
With,
By,
Then,
Continue,
Chop,
Same,
Cw,
Ccw,
Of,
The,
Way,
Between,
And,
Here,
Last,
Fill,
Nth, Print,
Copy,
Reset,
Exec,
Sh,
Command,
Define,
Undef,
Rand,
If,
Else,
For,
Do,
Sprintf,
Animate,
After,
Delay,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Corner {
N,
S,
E,
W,
Ne,
Se,
Nw,
Sw,
Start,
End,
Center,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Param {
Height,
Width,
Radius,
Diameter,
Thickness,
Length,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Func1 {
Abs,
Acos,
Asin,
Cos,
Exp,
Expe,
Int,
Log,
Loge,
Sign,
Sin,
Sqrt,
Tan,
Floor,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Func2 {
Atan2,
Max,
Min,
Pmod,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LineType {
Solid,
Dotted,
Dashed,
Invis,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TextPos {
Center,
Ljust,
Rjust,
Above,
Below,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Arrow {
Left, Right, Double, }
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Dir {
Up,
Down,
Right,
Left,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Prim {
Box,
Circle,
Ellipse,
Arc,
Line,
Arrow,
Move,
Spline,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Color {
Colored,
Outlined,
Shaded,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum EnvVar {
Arcrad,
Arrowht,
Arrowwid,
Boxht,
Boxrad,
Boxwid,
Circlerad,
Dashwid,
Ellipseht,
Ellipsewid,
Lineht,
Linewid,
Moveht,
Movewid,
Textht,
Textoffset,
Textwid,
Arrowhead,
Fillval,
Linethick,
Maxpsht,
Maxpswid,
Scale,
}