small fixes
This commit is contained in:
parent
9112736652
commit
664d464895
2 changed files with 4 additions and 8 deletions
|
@ -343,7 +343,7 @@ impl<
|
|||
// stack of table driven parser
|
||||
// content of the vec:
|
||||
// - first element: all of them combined represent the complete stack, of the parser.
|
||||
// - secount element: rule has to able to derive the code defined, by its inner childs and the unparsed code from the accompanying first element.
|
||||
// - secount element: rule has to able to derive the code defined, by its inner childs and the unparsed code from the accompanying first element.
|
||||
let mut stack: Vec<(Vec<Sentential<T, N>>, ParseTree<N, S>)> = vec![(
|
||||
vec![Sentential::NoneTerminal(self.grammar.start.clone())],
|
||||
ParseTree::new(None),
|
||||
|
@ -434,7 +434,6 @@ impl<
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
@ -102,8 +102,8 @@ scanner!(
|
|||
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
|
||||
enum NoneTerminals {
|
||||
P, // Program, ; separated
|
||||
L,
|
||||
Li,
|
||||
L, // Line of code
|
||||
Li, // line extended for assignments
|
||||
E, // Expression
|
||||
Ei, // Expression extended additive
|
||||
T, // Term, only containing Factors
|
||||
|
@ -169,8 +169,5 @@ fn main() {
|
|||
println!("conflict: {conflict}");
|
||||
println!("prase table: {:?}", grammar.parse_table);
|
||||
println!("parse\n\n");
|
||||
println!(
|
||||
"parsed: {:?}",
|
||||
grammar.parser(&mut m.iter_mut()).parse()
|
||||
)
|
||||
println!("parsed: {:?}", grammar.parser(&mut m.iter_mut()).parse())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue