mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
Start a set of simple examples.
* examples/calc++/Makefile, examples/calc++/calc++-driver.cc, * examples/calc++/calc++-driver.hh, * examples/calc++/calc++-parser.yy, * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc, * examples/calc++/compile, examples/calc++/test: New.
This commit is contained in:
26
examples/calc++/test
Executable file
26
examples/calc++/test
Executable file
@@ -0,0 +1,26 @@
|
||||
#! /bin/sh
|
||||
set +e
|
||||
cat >input <<EOF
|
||||
a := 1
|
||||
b := 2
|
||||
c := 3
|
||||
d := a + b * c
|
||||
d
|
||||
EOF
|
||||
|
||||
./calc++ input
|
||||
./calc++ -p input
|
||||
|
||||
cat >input <<EOF
|
||||
a := 1
|
||||
d := a + b * c
|
||||
EOF
|
||||
./calc++ input
|
||||
|
||||
set -x
|
||||
echo toto
|
||||
cat >input <<EOF
|
||||
toto := 1
|
||||
toto
|
||||
EOF
|
||||
./calc++ -s input
|
||||
Reference in New Issue
Block a user