Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pest-parser/pest
/ functions
Functions
1,009 in github.com/pest-parser/pest
⨍
Functions
1,009
◇
Types & classes
93
↓ 460 callers
Function
new
( queue: Rc<Vec<QueueableToken<'i, R>>>, input: &'i str, line_index: Rc<LineIndex>, start: usi
pest/src/iterators/pair.rs:48
↓ 120 callers
Method
match_string
(&mut self, string: &str)
pest/src/position.rs:405
↓ 110 callers
Method
clone
(&self)
pest/src/iterators/flat_pairs.rs:160
↓ 104 callers
Function
parse
(rule: Rule, data: &str)
meta/src/parser.rs:34
↓ 103 callers
Method
push
Pushes a `T` onto the `Stack`.
pest/src/stack.rs:71
↓ 84 callers
Method
sequence
(mut self: Box<Self>, f: F)
pest/src/parser_state.rs:909
↓ 83 callers
Method
rule
(mut self: Box<Self>, rule: R, f: F)
pest/src/parser_state.rs:659
↓ 66 callers
Method
next
(&mut self)
meta/src/ast.rs:391
↓ 48 callers
Method
as_str
(&self)
pest/src/span.rs:197
↓ 48 callers
Method
len
Returns the size of the stack
pest/src/stack.rs:92
↓ 42 callers
Method
into_inner
(self)
pest/src/iterators/pair.rs:241
↓ 41 callers
Method
as_rule
(&self)
pest/src/iterators/pair.rs:85
↓ 35 callers
Method
match_range
(&mut self, range: Range<char>)
pest/src/position.rs:440
↓ 34 callers
Method
as_span
(&self)
pest/src/iterators/pair.rs:203
↓ 32 callers
Function
unwrap_or_report
A helper that will unwrap the result or panic with the nicely formatted error message.
meta/src/lib.rs:36
↓ 31 callers
Method
repeat
(mut self: Box<Self>, mut f: F)
pest/src/parser_state.rs:959
↓ 29 callers
Method
optional
(mut self: Box<Self>, f: F)
pest/src/parser_state.rs:1001
↓ 27 callers
Method
get
Attempts to create a new span based on a sub-range. ``` use pest::Span; let input = "Hello World!"; let world = Span::new(input, 6, input.len()).unwr
pest/src/span.rs:67
↓ 26 callers
Function
consume_rules
Converts a parser's result (`Pairs`) to an AST
meta/src/parser.rs:211
↓ 25 callers
Method
atomic
(mut self: Box<Self>, atomicity: Atomicity, f: F)
pest/src/parser_state.rs:1439
↓ 23 callers
Method
span
(&self, other: &Position<'i>)
pest/src/position.rs:98
↓ 21 callers
Method
is_empty
(&self)
pest/src/stack.rs:61
↓ 21 callers
Method
pop
Pops the top-most `T` from the `Stack`.
pest/src/stack.rs:76
↓ 19 callers
Method
start_pos
(&self)
pest/src/span.rs:136
↓ 17 callers
Method
end_pos
(&self)
pest/src/span.rs:154
↓ 16 callers
Method
next
(&mut self)
pest/src/span.rs:366
↓ 15 callers
Method
snapshot
Takes a snapshot of the current `Stack`.
pest/src/stack.rs:97
↓ 13 callers
Method
flatten
(self)
pest/src/iterators/pairs.rs:217
↓ 13 callers
Method
line_col
(&self)
pest/src/position.rs:133
↓ 13 callers
Method
next
(&mut self)
pest/src/iterators/pairs.rs:426
↓ 11 callers
Function
consume_rules_with_spans
( pairs: Pairs<'_, Rule>, )
meta/src/parser.rs:258
↓ 11 callers
Method
lookahead
(mut self: Box<Self>, is_positive: bool, f: F)
pest/src/parser_state.rs:1370
↓ 11 callers
Method
restore
Rewinds the `Stack` to the most recent `snapshot()`. If no `snapshot()` has been taken, this function return the stack to its initial state.
pest/src/stack.rs:111
↓ 10 callers
Method
op
Add `op` to `PrattParser`.
pest/src/pratt_parser.rs:222
↓ 10 callers
Method
parse_expr
( &'a self, expr: &'a OptimizedExpr, state: Box<ParserState<'a, &'a str>>, )
vm/src/lib.rs:182
↓ 10 callers
Method
peek
Returns the top-most `&T` in the `Stack`.
pest/src/stack.rs:66
↓ 10 callers
Method
pos
(&self)
pest/src/position.rs:76
↓ 9 callers
Method
pair
(&self)
pest/src/iterators/pair.rs:295
↓ 9 callers
Method
pos
(&self, index: usize)
pest/src/iterators/pair.rs:304
↓ 7 callers
Method
inc_call_check_limit
(mut self: Box<Self>)
pest/src/parser_state.rs:625
↓ 7 callers
Function
parse_derive
(ast: DeriveInput)
generator/src/parse_derive.rs:30
↓ 7 callers
Method
parse_rule
( &'a self, rule: &'a str, state: Box<ParserState<'a, &'a str>>, )
vm/src/lib.rs:76
↓ 7 callers
Method
skip_until
(&mut self, strings: &[&str])
pest/src/position.rs:300
↓ 6 callers
Method
end
(&self)
pest/src/span.rs:118
↓ 6 callers
Function
optimize
Takes pest's ASTs and optimizes them
meta/src/optimizer/mod.rs:32
↓ 6 callers
Function
state
(input: &'i str, f: F)
pest/src/parser_state.rs:507
↓ 6 callers
Function
to_hash_map
(rules: &'a [ParserRule<'i>])
meta/src/validator.rs:630
↓ 6 callers
Method
tokens
(self)
pest/src/iterators/pair.rs:276
↓ 5 callers
Method
as_str
(&'a self)
pest/src/parser_state.rs:234
↓ 5 callers
Method
clear_snapshot
The parsing after the last snapshot was successful so clearing it.
pest/src/stack.rs:102
↓ 5 callers
Method
map_infix
Maps infix operators with a closure `infix`.
pest/src/pratt_parser.rs:303
↓ 5 callers
Method
map_primary
Maps primary expressions with a closure `primary`.
pest/src/pratt_parser.rs:238
↓ 5 callers
Function
new
( queue: Rc<Vec<QueueableToken<'i, R>>>, input: &'i str, line_index: Option<Rc<LineIndex>>, st
pest/src/iterators/pairs.rs:45
↓ 5 callers
Method
parse
( &'a self, rule: &'a str, input: &'a str, )
vm/src/lib.rs:67
↓ 5 callers
Method
skip
(&mut self, n: usize)
pest/src/position.rs:256
↓ 5 callers
Method
tag_node
(mut self: Box<Self>, tag: &'i str)
pest/src/parser_state.rs:818
↓ 5 callers
Function
unescape
(string: &str)
meta/src/parser.rs:707
↓ 5 callers
Function
validate_pairs
It checks the parsed grammar for common mistakes: - using Pest keywords - duplicate rules - undefined rules It returns a `Result` with a `Vec` of `Er
meta/src/validator.rs:82
↓ 4 callers
Method
as_borrowed_or_rc
(&self)
pest/src/parser_state.rs:259
↓ 4 callers
Method
atomicity
Returns the current atomicity of the `ParserState`. # Examples ``` # use pest; # use pest::Atomicity; # #[allow(non_camel_case_types)] # #[derive(Cl
pest/src/parser_state.rs:620
↓ 4 callers
Function
build_line_col
(line_col: (usize, usize), str: &str)
grammars/tests/json.rs:223
↓ 4 callers
Function
child_modifies_state
( expr: &OptimizedExpr, rules: &HashMap<String, OptimizedExpr>, cache: &mut HashMap<String, Option
meta/src/optimizer/restorer.rs:58
↓ 4 callers
Method
expr
(&mut self, pairs: &mut Peekable<P>, rbp: Prec)
pest/src/pratt_parser.rs:329
↓ 4 callers
Method
handle_token_parse_result
Generic function to handle result of char/string/range parsing in order to track (un)expected tokens.
pest/src/parser_state.rs:1013
↓ 4 callers
Function
is_non_failing
Checks if `expr` is non-failing, that is it matches any input. # Example ```pest non_failing_1 = { "" } ``` # Assumptions - In `ParserExpr::RepMinM
meta/src/validator.rs:427
↓ 4 callers
Method
lines
(&self)
pest/src/span.rs:241
↓ 4 callers
Method
lines_span
Iterates over all lines (partially) covered by this span. Yielding a `Span` for each line. # Examples ``` # use pest; # use pest::Span; # #[allow(no
pest/src/span.rs:265
↓ 4 callers
Method
map_bottom_up
Applies `f` to the `OptimizedExpr` bottom-up.
meta/src/optimizer/mod.rs:222
↓ 4 callers
Method
match_string
(mut self: Box<Self>, string: &str)
pest/src/parser_state.rs:1101
↓ 4 callers
Method
next
(&mut self)
pest/src/iterators/flat_pairs.rs:110
↓ 4 callers
Method
pos
(&self, index: usize)
pest/src/iterators/pairs.rs:407
↓ 4 callers
Method
position
Returns a reference to the current `Position` of the `ParserState`. # Examples ``` # use pest; # #[allow(non_camel_case_types)] # #[derive(Clone, Co
pest/src/parser_state.rs:598
↓ 4 callers
Method
skip
( &'a self, state: Box<ParserState<'a, &'a str>>, )
vm/src/lib.rs:257
↓ 4 callers
Method
start
(&self)
pest/src/span.rs:100
↓ 3 callers
Method
add_breakpoint
Adds a rule to breakpoints.
debugger/src/lib.rs:208
↓ 3 callers
Function
box_type
()
generator/src/generator.rs:819
↓ 3 callers
Function
consume_expr
( pairs: Peekable<Pairs<'i, Rule>>, pratt: &PrattParser<Rule>, )
meta/src/parser.rs:337
↓ 3 callers
Method
cont
Continue the debugger session from the breakpoint. It returns an error if the session finished or wasn't started yet.
debugger/src/lib.rs:336
↓ 3 callers
Method
end_of_input
(self: Box<Self>)
pest/src/parser_state.rs:1337
↓ 3 callers
Method
filter_map_top_down
will remove nodes that do not match `f`
meta/src/parser.rs:62
↓ 3 callers
Method
find_tagged
( self, tag: &'i str, )
pest/src/iterators/pairs.rs:327
↓ 3 callers
Function
is_non_progressing
Checks if `expr` is non-progressing, that is the expression does not consume any input or any stack. This includes expressions matching the empty inpu
meta/src/validator.rs:331
↓ 3 callers
Method
iterate_expr
(&mut self, expr: Expr)
meta/src/ast.rs:354
↓ 3 callers
Method
iterate_expr
(&mut self, expr: OptimizedExpr)
meta/src/optimizer/mod.rs:363
↓ 3 callers
Method
load_input_direct
Loads a parsing input from a string.
debugger/src/lib.rs:187
↓ 3 callers
Method
map_postfix
Maps postfix operators with closure `postfix`.
pest/src/pratt_parser.rs:294
↓ 3 callers
Method
map_prefix
Maps prefix operators with closure `prefix`.
pest/src/pratt_parser.rs:285
↓ 3 callers
Method
map_top_down
Applies `f` to the `OptimizedExpr` top-down.
meta/src/optimizer/mod.rs:173
↓ 3 callers
Function
merge_spans
Merges two spans into one. This function merges two spans that are contiguous or overlapping into a single span that covers the entire range of the t
pest/src/span.rs:340
↓ 3 callers
Function
new
( queue: Rc<Vec<QueueableToken<'i, R>>>, input: &'i str, line_index: Rc<LineIndex>, start: usi
pest/src/iterators/flat_pairs.rs:32
↓ 3 callers
Method
parse
(rule : Rule , input : & 'i str)
meta/src/grammar.rs:2
↓ 3 callers
Method
peek
(&self)
pest/src/iterators/pairs.rs:364
↓ 3 callers
Method
restore
(mut self: Box<Self>)
pest/src/parser_state.rs:1776
↓ 3 callers
Method
run
Starts a debugger session: runs a rule on an input and stops at breakpoints. When the debugger is stopped, an event is sent to the channel using `send
debugger/src/lib.rs:306
↓ 3 callers
Function
set_call_limit
Sets the maximum call limit for the parser state to prevent stack overflows or excessive execution times in some grammars. If set, the calls are track
pest/src/parser_state.rs:104
↓ 3 callers
Method
skip
(state : :: std :: boxed :: Box < :: pest :: ParserState < '_ , Rule >>)
meta/src/grammar.rs:2
↓ 3 callers
Method
split
(self)
pest/src/span.rs:172
↓ 3 callers
Method
start
(&self)
pest/src/error.rs:510
↓ 3 callers
Function
string
()
meta/src/ast.rs:451
↓ 3 callers
Function
unicode_property_names
Return all available unicode property names
pest/src/unicode/mod.rs:268
next →
1–100 of 1,009, ranked by callers