Struct ukhasnet_parser::Rdp
[−]
pub struct Rdp<T> { /* fields omitted */ }
Methods
impl<'input, T: Input<'input>> Rdp<T>
fn new(input: T) -> Rdp<T>
fn whitespace(&mut self) -> bool
fn any(&mut self) -> bool
fn soi(&mut self) -> bool
fn eoi(&mut self) -> bool
fn digit(&mut self) -> bool
fn integer(&mut self) -> bool
fn decimal(&mut self) -> bool
fn lowercase_letter(&mut self) -> bool
fn uppercase_letter(&mut self) -> bool
fn letter(&mut self) -> bool
fn symbol(&mut self) -> bool
fn repeat(&mut self) -> bool
fn sequence(&mut self) -> bool
fn decimal_list(&mut self) -> bool
fn voltage(&mut self) -> bool
fn current(&mut self) -> bool
fn temperature(&mut self) -> bool
fn humidity(&mut self) -> bool
fn pressure(&mut self) -> bool
fn custom(&mut self) -> bool
fn sun(&mut self) -> bool
fn rssi(&mut self) -> bool
fn count(&mut self) -> bool
fn windspeed(&mut self) -> bool
fn location(&mut self) -> bool
fn zombie_mode(&mut self) -> bool
fn zombie(&mut self) -> bool
fn data_field(&mut self) -> bool
fn data(&mut self) -> bool
fn comment_content(&mut self) -> bool
fn comment(&mut self) -> bool
fn node_name_content(&mut self) -> bool
fn node_name(&mut self) -> bool
fn path(&mut self) -> bool
fn packet(&mut self) -> bool
fn try<F>(&mut self, revert: bool, rule: F) -> bool where
F: FnOnce(&mut Self) -> bool,
F: FnOnce(&mut Self) -> bool,
fn prec_climb<F, G>(
&mut self,
pos: usize,
left: usize,
min_prec: u8,
last_op: Option<(Option<Rule>, u8, bool)>,
primary: &mut F,
climb: &mut G
) -> (Option<(Option<Rule>, u8, bool)>, Option<usize>) where
F: FnMut(&mut Self) -> bool,
G: FnMut(&mut Self) -> Option<(Option<Rule>, u8, bool)>,
&mut self,
pos: usize,
left: usize,
min_prec: u8,
last_op: Option<(Option<Rule>, u8, bool)>,
primary: &mut F,
climb: &mut G
) -> (Option<(Option<Rule>, u8, bool)>, Option<usize>) where
F: FnMut(&mut Self) -> bool,
G: FnMut(&mut Self) -> Option<(Option<Rule>, u8, bool)>,
fn _repeat(&self) -> u8
fn _sequence(&self) -> char
fn _location(&self) -> Location
fn _windspeed(&self) -> WindSpeed
fn _decimal_list(&self) -> Vec<f32>
fn _zombie(&self) -> u8
fn _datafield(&self) -> DataField
fn _data(&self) -> Vec<DataField>
fn _comment(&self) -> Option<String>
fn _node_name(&self) -> String
fn _path(&self) -> Vec<String>
fn parse(&self) -> Packet
Trait Implementations
impl<'input, T: Input<'input>> Parser<'input, T> for Rdp<T>
type Rule = Rule
type Token = Token<Rule>
fn input(&self) -> &T
fn input_mut(&mut self) -> &mut T
fn end(&self) -> bool
Returns whether a Parser
has reached its end.
fn eoi_matched(&self) -> bool
Returns whether a Parser
has matched end-of-input.
fn reset(&mut self)
Reset a Parser
.
fn queue(&self) -> &Vec<Token<Rule>>
Returns the queue of all matched Token
s.
fn queue_mut(&mut self) -> &mut Vec<Token<Rule>>
Returns the mutable queue of all matched Token
s.
fn queue_with_captures(&self) -> Vec<(Token<Rule>, String)>
Returns the queue of all matched (Token, value)
s.
fn queue_index(&self) -> usize
Returns the current index within the queue. Used in process!
.
fn inc_queue_index(&self)
Increments the current index within the queue. Used in process!
.
fn set_queue_index(&self, index: usize)
Set the current index within the queue. Used in process!
.
fn skip(&mut self)
Skips whitespace and comments.
fn is_atomic(&self) -> bool
Returns whether a Parser
is currently inside an atomic rule.
fn set_atomic(&mut self, value: bool)
Sets a Parser
to atomic rule mode, barring comment & white-space skipping.
fn track(&mut self, failed: Rule, pos: usize)
Keeps track of rule failures. It gets called when a Rule
fails at pos
.
fn tracked_len_pos(&self) -> (usize, usize)
Returns the length of the tracked Rule
s.
fn expected(&mut self) -> (Vec<Rule>, usize)
Retuns a Vec
of all expected Rule
s at the deepest position where the parsing last stopped. It only returns leafs from the rule tree. Used for error reporting. Read more
fn stack(&self) -> &Vec<String>
Returns the stack Vec
.
fn stack_mut(&mut self) -> &mut Vec<String>
Returns the mutable stack Vec
.