LEFT | RIGHT |
1 // Inferno utils/8a/a.y | 1 // Inferno utils/8a/a.y |
2 // http://code.google.com/p/inferno-os/source/browse/utils/8a/a.y | 2 // http://code.google.com/p/inferno-os/source/browse/utils/8a/a.y |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) | 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) |
6 // Portions Copyright © 1997-1999 Vita Nuova Limited | 6 // Portions Copyright © 1997-1999 Vita Nuova Limited |
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) | 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) |
8 // Portions Copyright © 2004,2006 Bruce Ellis | 8 // Portions Copyright © 2004,2006 Bruce Ellis |
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) | 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) |
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others | 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others |
(...skipping 15 matching lines...) Expand all Loading... |
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | 27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | 28 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
29 // THE SOFTWARE. | 29 // THE SOFTWARE. |
30 | 30 |
31 %{ | 31 %{ |
32 #include <u.h> | 32 #include <u.h> |
33 #include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */ | 33 #include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */ |
34 #include <libc.h> | 34 #include <libc.h> |
35 #include "a.h" | 35 #include "a.h" |
| 36 #include "../../pkg/runtime/funcdata.h" |
36 %} | 37 %} |
37 %union { | 38 %union { |
38 Sym *sym; | 39 Sym *sym; |
39 int32 lval; | 40 int32 lval; |
40 struct { | 41 struct { |
41 int32 v1; | 42 int32 v1; |
42 int32 v2; | 43 int32 v2; |
43 } con2; | 44 } con2; |
44 double dval; | 45 double dval; |
45 char sval[8]; | 46 char sval[8]; |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 $$ = $1 & $3; | 680 $$ = $1 & $3; |
680 } | 681 } |
681 | expr '^' expr | 682 | expr '^' expr |
682 { | 683 { |
683 $$ = $1 ^ $3; | 684 $$ = $1 ^ $3; |
684 } | 685 } |
685 | expr '|' expr | 686 | expr '|' expr |
686 { | 687 { |
687 $$ = $1 | $3; | 688 $$ = $1 | $3; |
688 } | 689 } |
LEFT | RIGHT |