mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-24 03:33:03 +00:00
examples: lexcalc: demonstrate location tracking
The bistromathic example should not use Flex, it makes it too complex. But it was the only example to show location tracking with Flex. * examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/parse.y, * examples/c/lexcalc/scan.l: Demonstrate location tracking as is done in bistromathic.
This commit is contained in:
@@ -29,4 +29,9 @@ run -noerr 0 9 -p
|
||||
cat >input <<EOF
|
||||
(1+2) *
|
||||
EOF
|
||||
run 1 'err: syntax error, unexpected end-of-line, expecting ( or number'
|
||||
run 1 'err: 1.8-2.0: syntax error, unexpected end-of-line, expecting ( or number'
|
||||
|
||||
cat >input <<EOF
|
||||
1 / (2 - 2)
|
||||
EOF
|
||||
run 1 'err: 1.1-11: error: division by zero"
|
||||
|
||||
Reference in New Issue
Block a user