pub enum Token {
Show 50 variants
Module,
EndModule,
Parameter,
Inout,
Input,
Output,
Reg,
Wire,
Assign,
Comb,
If,
Else,
Begin,
End,
Posedge,
Negedge,
Timescale,
Time(f64),
Pound,
OpenParen,
CloseParen,
OpenBracket,
CloseBracket,
OpenBrace,
CloseBrace,
BEQ,
BLT,
BGT,
BLTE,
BGTE,
Equals,
Subtract,
Add,
Multiply,
Divide,
QMark,
EMark,
Colon,
Semicolon,
Comma,
BTick,
Underscore,
At,
Newline,
WhiteSpace,
BinaryValue,
HiZValue,
Comment,
Word,
Integer(u64),
}Expand description
Lexer token output
Variants§
Module
Module start
EndModule
Module end
Parameter
Parameter start
Inout
Inout start
Input
Input start
Output
Output start
Reg
Register start
Wire
Wire start
Assign
Assign start
Comb
Combinational logic start
If
If statement start
Else
Else statement start
Begin
Begin statement
End
End statement
Posedge
Rising edge trigger
Negedge
Negative edge trigger
Timescale
Timescale start
Time(f64)
Simulation time
Accepts times in ns or ps
Pound
Pound symbol
OpenParen
Open parenthesis
CloseParen
Close parenthesis
OpenBracket
Open bracket
CloseBracket
Close bracket
OpenBrace
Open brace
CloseBrace
Close brace
BEQ
Equivalent comparison
BLT
Less than comparison
BGT
Greater than comparison
BLTE
Less than or equal to comparison
BGTE
Greater than or equal to comparison
Equals
Assignment start
Subtract
Subtraction
Add
Addition
Multiply
Multiply
Divide
Divide
QMark
Question mark
EMark
Exclamation point
Colon
Colon
Semicolon
Semicolon
Comma
Comma
BTick
Back tick
Underscore
Underscore
At
At symbol
Newline
Newline
WhiteSpace
Whitespace
BinaryValue
Binary value
Takes form X'bY where X is the bit width and Y is the desired value
HiZValue
Hi-Z value
Takes form X'bz where X is the bit width
Comment
Comment start
Word
Generic text
Integer(u64)
Integer value
Trait Implementations§
Source§impl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
Source§type Error = LexingError
type Error = LexingError
#[logos(error = MyError)]. Defaults to () if not set.Source§type Extras = ()
type Extras = ()
Extras for the particular lexer. This can be set using
#[logos(extras = MyExtras)] and accessed inside callbacks.Source§type Source = str
type Source = str
str,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8].Source§fn lex(lex: &mut Lexer<'s, Self>)
fn lex(lex: &mut Lexer<'s, Self>)
Lexer. The implementation for this function
is generated by the logos-derive crate.