spec/rley/parser/earley_parser_spec.rb in rley-0.2.11 vs spec/rley/parser/earley_parser_spec.rb in rley-0.2.12
- old
+ new
@@ -268,13 +268,13 @@
# Expectation chart[0]:
expected = [
'P => . S | 0', # start rule
"S => . S '+' M | 0", # predict from (1)
'S => . M | 0', # predict from (1)
- "M => . M '*' T | 0", # predict from (3)
- 'M => . T | 0', # predict from (3)
- 'T => . integer | 0' # predict from (3)
+ "M => . M '*' T | 0", # predict from (4)
+ 'M => . T | 0', # predict from (4)
+ 'T => . integer | 0' # predict from (4)
]
compare_state_texts(parse_result.chart[0], expected)
###################### S(1): 2 . + 3 * 4
@@ -635,10 +635,10 @@
expect(parse_result.success?).to eq(true)
###################### S(0) == . a a / a
# Expectation chart[0]:
expected = [
- 'Z => . E | 0', # start rule
+ 'Z => . E | 0', # start rule
'E => . E Q F | 0', # predict from (1)
'E => . F | 0', # predict from (1)
"F => . 'a' | 0" # predict from (3)
]
compare_state_texts(parse_result.chart[0], expected)