]> git.saurik.com Git - bison.git/blob - examples/calc++/calc++.test
Merge remote-tracking branch 'origin/maint'
[bison.git] / examples / calc++ / calc++.test
1 #! /bin/sh
2
3 # Copyright (C) 2005-2013 Free Software Foundation, Inc.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 cat >input <<EOF
19 toto := 1
20 toto
21 EOF
22 run 0 1 -s
23
24
25 cat >input <<EOF
26 a := 1
27 b := 2
28 c := 3
29 d := a + b * c
30 d
31 EOF
32 run 0 7
33 run 0 7 -p
34
35
36 cat >input <<EOF
37 a := 1
38 b := 2
39 c := 3
40 d := (a + b) * c
41 d
42 EOF
43 run 0 9
44
45
46 cat >input <<EOF
47 a := 1
48 d := a + b * c
49 EOF
50 run 1 ''