Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MashPlant/lalr1
/ functions
Functions
96 in github.com/MashPlant/lalr1
⨍
Functions
96
◇
Types & classes
33
↓ 31 callers
Method
get
(&self, i: usize)
ll1-core/src/lib.rs:69
↓ 9 callers
Method
token_num
(&self)
common/src/grammar.rs:262
↓ 7 callers
Method
as_nt
try to convert a general id (in [0, terms.len() + nt.len())) to a index in `nt` (result is in [0, nt.len()))
common/src/grammar.rs:264
↓ 7 callers
Function
assert
(t: Token, kind: TokenKind, piece: &[u8])
tests/src/literal_string.rs:45
↓ 7 callers
Method
unique_id
(&self)
lalr1-core/src/lib.rs:81
↓ 6 callers
Method
start
(&self)
common/src/grammar.rs:258
↓ 5 callers
Method
get_prod
get all productions with lhs = parameter `lhs` please note that parameter `lhs` should be within [0, nt.len()), not [terms.len(), terms.len() + nt.len
common/src/grammar.rs:268
↓ 5 callers
Function
write
(path: &str, s: impl Display)
parser-gen/src/lib.rs:44
↓ 4 callers
Method
closure
(&mut self, mut items: HashMap<Lr0Item<'a>, Box<[u32]>>, g: &'a Grammar<'a>)
lalr1-core/src/lr1.rs:35
↓ 4 callers
Function
gather_types
(g: &Grammar<'a>)
parser-gen/src/fmt.rs:14
↓ 3 callers
Method
cmp
(&self, other: &Self)
lalr1-core/src/lib.rs:99
↓ 3 callers
Method
extend
will add a production _Start -> Start, so need mut if `validate_name == true`, will call `validate_variable_name` to check every token's name otherwis
common/src/grammar.rs:153
↓ 3 callers
Function
validate_variable_name
note: EPS/EOF/ERR's contents are not valid variable names
common/src/grammar.rs:71
↓ 2 callers
Function
closure
(mut items: HashSet<Lr0Item<'a>>, g: &'a Grammar<'a>)
lalr1-core/src/lr0.rs:13
↓ 2 callers
Function
conflict
(table: &LLTable, g: &Grammar)
parser-gen/src/show_ll.rs:44
↓ 2 callers
Method
first
(&self, string: &[u32], g: &Grammar)
ll1-core/src/lib.rs:48
↓ 2 callers
Function
parse_arrow_prod
parse a "lhs -> rhs1 rhs2 ..." string
common/src/lib.rs:15
↓ 2 callers
Function
parse_attrs
(attrs: &[Attribute])
parser-macros/src/lib.rs:57
↓ 2 callers
Method
rs_common
(&mut self, g: &Grammar, dfa: &Dfa, types: &[&str], stack_need_fail: bool)
parser-gen/src/rs.rs:4
↓ 2 callers
Function
show_link
(g: &Grammar, link: &HashMap<u32, u32>, idx: usize, f: &mut Formatter)
parser-gen/src/show_lr.rs:56
↓ 2 callers
Method
show_prod
parameter `id` is a production id (in [0, prod.len()))
common/src/grammar.rs:280
↓ 2 callers
Function
table
(ll: &'a LLCtx, g: &'a Grammar)
parser-gen/src/show_ll.rs:14
↓ 2 callers
Function
work
(attr: TokenStream, input: TokenStream, algo: PGAlgo)
parser-macros/src/lib.rs:61
↓ 1 callers
Function
comma_sep
(it: impl Iterator<Item=T> + Clone + 'a)
parser-gen/src/fmt.rs:4
↓ 1 callers
Method
cpp_lalr1
(&mut self, g: &Grammar, table: &Table, dfa: &Dfa)
parser-gen/src/cpp.rs:4
↓ 1 callers
Method
dfa
(&mut self, dfa: &Dfa)
parser-gen/src/lib.rs:49
↓ 1 callers
Method
error
(&mut self)
tests/src/ll1.rs:83
↓ 1 callers
Method
first
one beta, and many a
lalr1-core/src/lr1.rs:10
↓ 1 callers
Function
go
(items: &Vec<Lr0Item<'a>>, mov: u32, g: &'a Grammar<'a>)
lalr1-core/src/lr0.rs:3
↓ 1 callers
Method
go
`go` was used by lr1 before, now not used
lalr1-core/src/lr1.rs:21
↓ 1 callers
Method
grammar_error
(&mut self, reason: String)
parser-gen/src/lib.rs:15
↓ 1 callers
Method
java_lalr1
(&mut self, g: &Grammar, table: &Table, dfa: &Dfa)
parser-gen/src/java.rs:4
↓ 1 callers
Method
ll
(&mut self, g: &Grammar, ll: LLCtx, dfa: &Dfa)
parser-gen/src/lib.rs:57
↓ 1 callers
Method
lr1
(&mut self, g: &Grammar, lr1: &Lr1Fsm, dfa: &Dfa, orig_table: Table, table: Table, conflict: Vec<Conflict>)
parser-gen/src/lib.rs:68
↓ 1 callers
Function
lr1_dot
(g: &'a Grammar, lr1: &'a Lr1Fsm)
parser-gen/src/show_lr.rs:79
↓ 1 callers
Function
mk_table
(lr1: &'a Lr1Fsm<'a>, g: &'a Grammar<'a>)
lalr1-core/src/mk_table.rs:3
↓ 1 callers
Function
parse_lines
(s: &str)
parser-gen/examples/simple_grammar.rs:7
↓ 1 callers
Function
parse_term
input: the two field in RawGrammar(or constructed in other ways) return: (Vec<(term, pri_assoc)>, term2id)
common/src/grammar.rs:81
↓ 1 callers
Method
re2dfa_error
(&mut self, re: &str, reason: String)
parser-gen/src/lib.rs:17
↓ 1 callers
Method
rs_lalr1
return None if `rs_common` returns None, you can check the doc of `rs_common`
parser-gen/src/rs.rs:74
↓ 1 callers
Method
rs_ll1
(&mut self, g: &Grammar, ll: &LLCtx, dfa: &Dfa)
parser-gen/src/rs.rs:98
↓ 1 callers
Method
show_token
parameter `id` is a general id (in [0, terms.len() + nt.len()))
common/src/grammar.rs:275
↓ 1 callers
Function
solve
`solve` will modify t in these ways: for conflicts solved based on precedence and/or associativity, other choices are removed for conflicts solved bas
lalr1-core/src/mk_table.rs:47
↓ 1 callers
Function
work
(mut raw: RawGrammar, algo: PGAlgo, gen: &mut impl Codegen)
parser-gen/src/lib.rs:85
Method
_parse
parse impl with some error recovering(not fully unimplemented yet) will be called be the generated parse function
tests/src/ll1.rs:87
Function
acc
(g: &'a Grammar, dfa: &'a Dfa, namespace: &'a str)
parser-gen/src/fmt.rs:27
Function
action
(g: &'a Grammar, table: &'a Table, bracket: (char, char))
parser-gen/src/fmt.rs:60
Function
conflict
(g: &Grammar, c: &[Conflict])
parser-gen/src/show_lr.rs:29
Method
deref
(&self)
lalr1-core/src/lib.rs:104
Function
dfa_edge
(dfa: &'a Dfa, bracket: (char, char))
parser-gen/src/fmt.rs:36
Method
eq
(&self, other: &Lr0Item)
lalr1-core/src/lib.rs:89
Method
expr
(_: Token)
tests/src/literal_string.rs:42
Method
expr_add
(l: i32, _op: Token, r: i32)
tests/src/lalr1.rs:15
Method
expr_div
(l: i32, _op: Token, r: i32)
tests/src/lalr1.rs:21
Method
expr_int
(i: Token)
tests/src/lalr1.rs:30
Method
expr_mod
(l: i32, _op: Token, r: i32)
tests/src/lalr1.rs:23
Method
expr_mul
(l: i32, _op: Token, r: i32)
tests/src/lalr1.rs:19
Method
expr_neg
(_op: Token, r: i32)
tests/src/lalr1.rs:26
Method
expr_paren
(_l: Token, i: i32, _r: Token)
tests/src/lalr1.rs:28
Method
expr_sub
(l: i32, _op: Token, r: i32)
tests/src/lalr1.rs:17
Function
find_subsequence
(haystack: &[u8], needle: &[u8])
tests/src/literal_string.rs:5
Method
fmt
(&self, f: &mut Formatter)
parser-macros/src/lib.rs:51
Method
gen_act
log_reduce == self.log_reduce, but this functions cannot borrow self is_pair == true: `stk` is Vec<(StackItem, integer)>; is_pair == false: `stk` is V
parser-gen/src/rs.rs:46
Function
goto
(g: &'a Grammar, table: &'a Table, bracket: (char, char))
parser-gen/src/fmt.rs:49
Method
hash
(&self, state: &mut H)
lalr1-core/src/lib.rs:85
Method
is_many
(&self)
lalr1-core/src/lib.rs:77
Function
lalr1
(attr: TokenStream, input: TokenStream)
parser-macros/src/lib.rs:126
Function
lalr1
()
tests/src/lalr1.rs:34
Function
literal_string
()
tests/src/literal_string.rs:51
Function
ll1
(attr: TokenStream, input: TokenStream)
parser-macros/src/lib.rs:129
Function
ll1
()
tests/src/ll1.rs:121
Function
lr0_dot
(g: &'a Grammar, lr0: &'a Lr0Fsm)
parser-gen/src/show_lr.rs:63
Function
main
()
parser-gen/src/parser_gen.rs:5
Function
main
()
parser-gen/examples/simple_grammar.rs:33
Function
min_u
(x: usize)
parser-gen/src/fmt.rs:9
Method
new
(g: &Grammar)
lalr1-core/src/lr1.rs:7
Method
new
(g: &Grammar)
ll1-core/src/lib.rs:10
Function
parse_arg
(arg: &FnArg)
parser-macros/src/lib.rs:12
Method
partial_cmp
(&self, other: &Lr0Item)
lalr1-core/src/lib.rs:95
Method
r0
(mut t: i32, remain: Vec<(Op, i32)>)
tests/src/ll1.rs:12
Method
r1
(_op: Token, t: i32, mut remain: Vec<(Op, i32)>)
tests/src/ll1.rs:24
Method
r10
(i: Token, r: i32)
tests/src/ll1.rs:76
Method
r11
(_l: Token, x: i32, _r: Token)
tests/src/ll1.rs:79
Method
r2
(_op: Token, t: i32, mut remain: Vec<(Op, i32)>)
tests/src/ll1.rs:30
Method
r3
()
tests/src/ll1.rs:36
Method
r4
(mut t: i32, remain: Vec<(Op, i32)>)
tests/src/ll1.rs:39
Method
r5
(_op: Token, t: i32, mut remain: Vec<(Op, i32)>)
tests/src/ll1.rs:52
Method
r6
(_op: Token, t: i32, mut remain: Vec<(Op, i32)>)
tests/src/ll1.rs:58
Method
r7
(_op: Token, t: i32, mut remain: Vec<(Op, i32)>)
tests/src/ll1.rs:64
Method
r8
()
tests/src/ll1.rs:70
Method
r9
(i: Token)
tests/src/ll1.rs:73
Function
show_prod_token
(g: &'a Grammar)
parser-gen/src/show_ll.rs:4
Function
table
(orig_table: &'a Table, table: &'a Table, g: &'a Grammar)
parser-gen/src/show_lr.rs:3
Function
work
(g: &'a Grammar)
lalr1-core/src/lr0.rs:31
Function
work
I think it is only for `simple_grammar.rs`'s use now...
lalr1-core/src/lr1.rs:65
Function
work
(lr0: Lr0Fsm<'a>, g: &'a Grammar<'a>)
lalr1-core/src/lalr1_by_lr0.rs:4