22 lines
477 B
Text
22 lines
477 B
Text
=====================================================
|
|
errors at the top level
|
|
=====================================================
|
|
|
|
x * * y
|
|
|
|
---
|
|
|
|
(ERROR (variable) (UNEXPECTED '*') (variable))
|
|
|
|
=====================================================
|
|
errors inside parenthesized expressions
|
|
=====================================================
|
|
|
|
x + (y * + z) * 5
|
|
|
|
---
|
|
|
|
(program (sum
|
|
(variable)
|
|
(product
|
|
(group (ERROR (variable) (UNEXPECTED '+') (variable))) (number))))
|