View | Details | Raw Unified | Return to bug 247363 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +2 lines)
Lines 4-10 Link Here
4
PORTNAME=	aegis
4
PORTNAME=	aegis
5
PORTVERSION=	4.25
5
PORTVERSION=	4.25
6
DISTVERSIONSUFFIX=	.D510
6
DISTVERSIONSUFFIX=	.D510
7
PORTREVISION=	11
7
PORTREVISION=	12
8
CATEGORIES=	devel
8
CATEGORIES=	devel
9
MASTER_SITES=	SF
9
MASTER_SITES=	SF
10
10
Lines 16-22 Link Here
16
LIB_DEPENDS=	libcurl.so:ftp/curl
16
LIB_DEPENDS=	libcurl.so:ftp/curl
17
RUN_DEPENDS=	tkdiff:textproc/tkdiff
17
RUN_DEPENDS=	tkdiff:textproc/tkdiff
18
18
19
USES=		gettext ghostscript gnome groff perl5 tk
19
USES=		gettext ghostscript gnome groff perl5 tk bison
20
USE_GNOME=	libxml2
20
USE_GNOME=	libxml2
21
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
CPPFLAGS+=	"-I${LOCALBASE}/include"
22
CPPFLAGS+=	"-I${LOCALBASE}/include"
(-)files/patch-aefind_cmdline_y (+18 lines)
Line 0 Link Here
1
--- aefind/cmdline.y.orig	2020-06-17 17:53:49.450461000 -0400
2
+++ aefind/cmdline.y	2020-06-17 17:54:14.484267000 -0400
3
@@ -2,6 +2,7 @@
4
  * aegis - project change supervisor
5
  * Copyright (C) 1997-1999, 2001-2008, 2011, 2012 Peter Miller
6
  * Copyright (C) 2007 Walter Franzini
7
+ * Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  * This program is free software; you can redistribute it and/or modify
10
  * it under the terms of the GNU General Public License as published by
11
@@ -17,6 +18,7 @@
12
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {cmdline_}
16
 %{
17
 
18
 #include <common/ac/assert.h>
(-)files/patch-aeimport_format_rcs_gram_y (+18 lines)
Line 0 Link Here
1
--- aeimport/format/rcs/gram.y.orig	2020-06-17 17:55:08.321101000 -0400
2
+++ aeimport/format/rcs/gram.y	2020-06-17 17:55:44.146287000 -0400
3
@@ -1,6 +1,7 @@
4
 /*
5
  *      aegis - project change supervisor
6
  *      Copyright (C) 2001-2006, 2008, 2012 Peter Miller
7
+ *      Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  *      This program is free software; you can redistribute it and/or modify
10
  *      it under the terms of the GNU General Public License as published by
11
@@ -17,6 +18,7 @@
12
  *      <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {format_rcs_gram_}
16
 %{
17
 
18
 #include <common/ac/assert.h>
(-)files/patch-aeimport_format_sccs_gram_y (+18 lines)
Line 0 Link Here
1
--- aeimport/format/sccs/gram.y.orig	2020-06-17 17:56:11.007600000 -0400
2
+++ aeimport/format/sccs/gram.y	2020-06-17 17:56:29.944250000 -0400
3
@@ -1,6 +1,7 @@
4
 /*
5
  * aegis - project change supervisor
6
  * Copyright (C) 2001-2008, 2012 Peter Miller
7
+ * Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  * This program is free software; you can redistribute it and/or modify
10
  * it under the terms of the GNU General Public License as published by
11
@@ -16,6 +17,7 @@
12
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {format_sccs_gram_}
16
 %{
17
 
18
 #include <common/ac/assert.h>
(-)files/patch-common_gettime_y (+18 lines)
Line 0 Link Here
1
--- common/gettime.y.orig	2020-06-17 17:45:06.095616000 -0400
2
+++ common/gettime.y	2020-06-17 17:45:33.928740000 -0400
3
@@ -1,6 +1,7 @@
4
 /*
5
  * aegis - project change supervisor
6
  * Copyright (C) 1991-1995, 1997-1999, 2002-2008, 2012 Peter Miller
7
+ * Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  * This program is free software; you can redistribute it and/or modify
10
  * it under the terms of the GNU General Public License as published by
11
@@ -21,6 +22,7 @@
12
  * Steven Bellovin <smb@cs.unc.edu>
13
  */
14
 
15
+%define api.prefix {gettime_}
16
 %token  AGO
17
 %token  COLON
18
 %token  COMMA
(-)files/patch-fmtgen_lex_cc (+19 lines)
Line 0 Link Here
1
--- fmtgen/lex.cc.orig	2020-06-17 17:44:00.521184000 -0400
2
+++ fmtgen/lex.cc	2020-06-17 17:44:09.243453000 -0400
3
@@ -1,6 +1,7 @@
4
 //
5
 // aegis - project change supervisor
6
 // Copyright (C) 1991-1995, 1997, 1999, 2002-2008, 2012 Peter Miller
7
+// Copyright (C) 2020 Aryeh M. Friedman
8
 //
9
 // This program is free software; you can redistribute it and/or modify
10
 // it under the terms of the GNU General Public License as published by
11
@@ -48,7 +49,7 @@
12
 
13
 static file_ty *file;
14
 static int error_count;
15
-extern parse_STYPE parse_lval;
16
+extern PARSE_STYPE parse_lval;
17
 static nstring_list ifiles;
18
 static nstring_list include_path;
19
 static symtab<int> keyword;
(-)files/patch-fmtgen_parse_y (+35 lines)
Line 0 Link Here
1
--- fmtgen/parse.y.orig	2020-06-17 17:42:24.867502000 -0400
2
+++ fmtgen/parse.y	2020-06-17 17:43:25.898841000 -0400
3
@@ -2,6 +2,7 @@
4
  * aegis - project change supervisor
5
  * Copyright (C) 1991-1994, 1997-1999, 2001-2008, 2012 Peter Miller
6
  * Copyright (C) 2007 Walter Franzini
7
+ * Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  * This program is free software; you can redistribute it and/or modify
10
  * it under the terms of the GNU General Public License as published by
11
@@ -17,8 +18,8 @@
12
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {parse_}
16
 %{
17
-
18
 #include <common/ac/ctype.h>
19
 #include <common/ac/stdio.h>
20
 #include <common/ac/stdlib.h>
21
@@ -208,12 +209,12 @@
22
     trace(("}\n"));
23
 }
24
 
25
+int yyparse(void);
26
+extern int yylex(void);
27
 
28
 void
29
 parse(const generator::pointer &g, const nstring &definition_file)
30
 {
31
-    extern int yyparse(void);
32
-
33
     /*
34
      * initial name is the basename of the definition file
35
      */
(-)files/patch-libaegis_aer_lex_cc (+19 lines)
Line 0 Link Here
1
--- libaegis/aer/lex.cc.orig	2020-06-17 18:13:58.645709000 -0400
2
+++ libaegis/aer/lex.cc	2020-06-17 18:14:15.245886000 -0400
3
@@ -1,6 +1,7 @@
4
 //
5
 // aegis - project change supervisor
6
 // Copyright (C) 1991-1996, 1998, 1999, 2001-2008, 2012 Peter Miller
7
+// Copyright (C) 2020 Aryeh M. Friedman
8
 //
9
 // This program is free software; you can redistribute it and/or modify
10
 // it under the terms of the GNU General Public License as published by
11
@@ -40,7 +41,7 @@
12
 
13
 static input ip;
14
 static int      error_count;
15
-extern aer_report_STYPE aer_report_lval;
16
+extern AER_REPORT_STYPE aer_report_lval;
17
 static nstring_accumulator buffer;
18
 static symtab_ty *stp;
19
 
(-)files/patch-libaegis_aer_report_y (+18 lines)
Line 0 Link Here
1
--- libaegis/aer/report.y.orig	2020-06-17 17:46:55.348947000 -0400
2
+++ libaegis/aer/report.y	2020-06-17 17:47:40.813660000 -0400
3
@@ -1,6 +1,7 @@
4
 /*
5
  *      aegis - project change supervisor
6
  *      Copyright (C) 1994-1996, 1999, 2002, 2005-2008, 2012 Peter Miller
7
+ *      Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  *      This program is free software; you can redistribute it and/or modify
10
  *      it under the terms of the GNU General Public License as published by
11
@@ -17,6 +18,7 @@
12
  *      <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {aer_report_}
16
 %{
17
 
18
 #include <common/ac/assert.h>
(-)files/patch-libaegis_gram_y (+18 lines)
Line 0 Link Here
1
--- libaegis/gram.y.orig	2020-06-17 17:49:20.265476000 -0400
2
+++ libaegis/gram.y	2020-06-17 17:49:37.193953000 -0400
3
@@ -1,6 +1,7 @@
4
 /*
5
  * aegis - project change supervisor
6
  * Copyright (C) 1991-1994, 1999, 2002, 2004-2006, 2008, 2012 Peter Miller
7
+ * Copyright (C) 2020 Aryeh M. Friedman
8
  *
9
  * This program is free software; you can redistribute it and/or modify
10
  * it under the terms of the GNU General Public License as published by
11
@@ -17,6 +18,7 @@
12
  * <http://www.gnu.org/licenses/>.
13
  */
14
 
15
+%define api.prefix {gram_}
16
 %{
17
 
18
 #include <common/ac/stdio.h>
(-)files/patch-libaegis_meta_lex_cc (+19 lines)
Line 0 Link Here
1
--- libaegis/meta_lex.cc.orig	2020-06-17 18:16:18.858528000 -0400
2
+++ libaegis/meta_lex.cc	2020-06-17 18:16:45.666339000 -0400
3
@@ -1,6 +1,7 @@
4
 //
5
 // aegis - project change supervisor
6
 // Copyright (C) 1991-1996, 1998, 1999, 2001-2008, 2010, 2012 Peter Miller
7
+// Copyright (C) 2020 Aryeh M. Friedman
8
 //
9
 // This program is free software; you can redistribute it and/or modify
10
 // it under the terms of the GNU General Public License as published by
11
@@ -46,7 +47,7 @@
12
 static input source;
13
 
14
 static int error_count;
15
-extern gram_STYPE gram_lval;
16
+extern GRAM_STYPE gram_lval;
17
 static nstring_accumulator buffer;
18
 
19
 
(-)files/patch-libaegis_sub_expr_gram_y (+149 lines)
Line 0 Link Here
1
--- libaegis/sub/expr_gram.y.orig	2020-06-17 17:51:38.214116000 -0400
2
+++ libaegis/sub/expr_gram.y	2020-06-17 17:52:02.149971000 -0400
3
@@ -1,22 +1,24 @@
4
 /*
5
- *	aegis - project change supervisor
6
- *	Copyright (C) 1996, 1999, 2002, 2003, 2005-2008 Peter Miller
7
+ * aegis - project change supervisor
8
+ * Copyright (C) 1996, 1999, 2002, 2003, 2005-2008 Peter Miller
9
+ * Copyright (C) 2020 Aryeh M. Friedman
10
  *
11
- *	This program is free software; you can redistribute it and/or modify
12
- *	it under the terms of the GNU General Public License as published by
13
- *	the Free Software Foundation; either version 3 of the License, or
14
- *	(at your option) any later version.
15
+ * This program is free software; you can redistribute it and/or modify
16
+ * it under the terms of the GNU General Public License as published by
17
+ * the Free Software Foundation; either version 3 of the License, or
18
+ * (at your option) any later version.
19
  *
20
- *	This program is distributed in the hope that it will be useful,
21
- *	but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
- *	GNU General Public License for more details.
24
+ * This program is distributed in the hope that it will be useful,
25
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
+ * GNU General Public License for more details.
28
  *
29
- *	You should have received a copy of the GNU General Public License
30
- *	along with this program. If not, see
31
- *	<http://www.gnu.org/licenses/>.
32
+ * You should have received a copy of the GNU General Public License
33
+ * along with this program. If not, see
34
+ * <http://www.gnu.org/licenses/>.
35
  */
36
 
37
+%define api.prefix {sub_expr_gram_}
38
 %{
39
 
40
 #include <common/ac/stdarg.h>
41
@@ -57,7 +59,7 @@
42
 
43
 %union
44
 {
45
-	long	lv_number;
46
+ long lv_number;
47
 }
48
 
49
 %type <lv_number> NUMBER expr
50
@@ -94,7 +96,7 @@
51
 
52
     trace(("}\n"));
53
     if (bad)
54
-	return "";
55
+ return "";
56
     return nstring::format("%ld", result);
57
 }
58
 
59
@@ -112,21 +114,21 @@
60
 /*
61
  * jiggery-pokery for yacc
62
  *
63
- *	Replace all calls to printf with a call to trace_printf.  The
64
- *	trace_where_ is needed to set the location, and is safe, because
65
- *	yacc only invokes the printf with an if (be careful, the printf
66
- *	is not in a compound statement).
67
+ * Replace all calls to printf with a call to trace_printf.  The
68
+ * trace_where_ is needed to set the location, and is safe, because
69
+ * yacc only invokes the printf with an if (be careful, the printf
70
+ * is not in a compound statement).
71
  */
72
 #define printf trace_where_, trace_printf
73
 
74
 /*
75
  * jiggery-pokery for bison
76
  *
77
- *	Replace all calls to fprintf with a call to yydebugger.  Ignore
78
- *	the first argument, it will be "stderr".  The trace_where_ is
79
- *	needed to set the location, and is safe, because bison only
80
- *	invokes the printf with an if (be careful, the fprintf is not in
81
- *	a compound statement).
82
+ * Replace all calls to fprintf with a call to yydebugger.  Ignore
83
+ * the first argument, it will be "stderr".  The trace_where_ is
84
+ * needed to set the location, and is safe, because bison only
85
+ * invokes the printf with an if (be careful, the fprintf is not in
86
+ * a compound statement).
87
  */
88
 #define fprintf trace_where_, yydebugger
89
 
90
@@ -151,40 +153,41 @@
91
 
92
 grammar:
93
     expr
94
-	{ result = $1; }
95
+ { result = $1; }
96
     ;
97
 
98
 expr
99
     : LP expr RP
100
-	{ $$ = $2; trace(("$$ = %ld;\n", $$)); }
101
+ { $$ = $2; trace(("$$ = %ld;\n", $$)); }
102
     | NUMBER
103
-	{ $$ = $1; trace(("$$ = %ld;\n", $$)); }
104
+ { $$ = $1; trace(("$$ = %ld;\n", $$)); }
105
     | MINUS expr
106
-	%prec UNARY
107
-	{ $$ = -$2; trace(("$$ = %ld;\n", $$)); }
108
+ %prec UNARY
109
+ { $$ = -$2; trace(("$$ = %ld;\n", $$)); }
110
     | expr PLUS expr
111
-	{ $$ = $1 + $3; trace(("$$ = %ld;\n", $$)); }
112
+ { $$ = $1 + $3; trace(("$$ = %ld;\n", $$)); }
113
     | expr MINUS expr
114
-	{ $$ = $1 - $3; trace(("$$ = %ld;\n", $$)); }
115
+ { $$ = $1 - $3; trace(("$$ = %ld;\n", $$)); }
116
     | expr MUL expr
117
-	{ $$ = $1 * $3; trace(("$$ = %ld;\n", $$)); }
118
+ { $$ = $1 * $3; trace(("$$ = %ld;\n", $$)); }
119
     | expr DIV expr
120
-	{ $$ = $3 ? $1 / $3 : 0; trace(("$$ = %ld;\n", $$)); }
121
+ { $$ = $3 ? $1 / $3 : 0; trace(("$$ = %ld;\n", $$)); }
122
     | expr MOD expr
123
-	{ $$ = $3 ? $1 % $3 : 0; trace(("$$ = %ld;\n", $$)); }
124
+ { $$ = $3 ? $1 % $3 : 0; trace(("$$ = %ld;\n", $$)); }
125
     | expr EQ expr
126
-	{ $$ = ($1 == $3); trace(("$$ = %ld;\n", $$)); }
127
+ { $$ = ($1 == $3); trace(("$$ = %ld;\n", $$)); }
128
     | expr NE expr
129
-	{ $$ = ($1 != $3); trace(("$$ = %ld;\n", $$)); }
130
+ { $$ = ($1 != $3); trace(("$$ = %ld;\n", $$)); }
131
     | expr LT expr
132
-	{ $$ = ($1 < $3); trace(("$$ = %ld;\n", $$)); }
133
+ { $$ = ($1 < $3); trace(("$$ = %ld;\n", $$)); }
134
     | expr LE expr
135
-	{ $$ = ($1 <= $3); trace(("$$ = %ld;\n", $$)); }
136
+ { $$ = ($1 <= $3); trace(("$$ = %ld;\n", $$)); }
137
     | expr GT expr
138
-	{ $$ = ($1 > $3); trace(("$$ = %ld;\n", $$)); }
139
+ { $$ = ($1 > $3); trace(("$$ = %ld;\n", $$)); }
140
     | expr GE expr
141
-	{ $$ = ($1 >= $3); trace(("$$ = %ld;\n", $$)); }
142
+ { $$ = ($1 >= $3); trace(("$$ = %ld;\n", $$)); }
143
     | NOT expr
144
-	%prec UNARY
145
-	{ $$ = (!$2); trace(("$$ = %ld;\n", $$)); }
146
+ %prec UNARY
147
+ { $$ = (!$2); trace(("$$ = %ld;\n", $$)); }
148
     ;
149
+// vim: set ts=8 sw=4 et :
(-)files/patch-libaegis_sub_plural_gram_y (+373 lines)
Line 0 Link Here
1
--- libaegis/sub/plural_gram.y.orig	2020-06-17 17:52:35.548476000 -0400
2
+++ libaegis/sub/plural_gram.y	2020-06-17 17:52:46.221850000 -0400
3
@@ -1,22 +1,24 @@
4
 /*
5
- *	aegis - project change supervisor
6
- *	Copyright (C) 2002-2008 Peter Miller
7
+ * aegis - project change supervisor
8
+ * Copyright (C) 2002-2008 Peter Miller
9
+ * Copyright (C) 2020 Aryeh M. Friedman
10
  *
11
- *	This program is free software; you can redistribute it and/or modify
12
- *	it under the terms of the GNU General Public License as published by
13
- *	the Free Software Foundation; either version 3 of the License, or
14
- *	(at your option) any later version.
15
+ * This program is free software; you can redistribute it and/or modify
16
+ * it under the terms of the GNU General Public License as published by
17
+ * the Free Software Foundation; either version 3 of the License, or
18
+ * (at your option) any later version.
19
  *
20
- *	This program is distributed in the hope that it will be useful,
21
- *	but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
- *	GNU General Public License for more details.
24
+ * This program is distributed in the hope that it will be useful,
25
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
+ * GNU General Public License for more details.
28
  *
29
- *	You should have received a copy of the GNU General Public License
30
- *	along with this program. If not, see
31
- *	<http://www.gnu.org/licenses/>.
32
+ * You should have received a copy of the GNU General Public License
33
+ * along with this program. If not, see
34
+ * <http://www.gnu.org/licenses/>.
35
  */
36
 
37
+%define api.prefix {sub_plural_gram_}
38
 %{
39
 
40
 #include <common/ac/stdarg.h>
41
@@ -114,9 +116,9 @@
42
 
43
     trace(("}\n"));
44
     if (bad)
45
-	return 0;
46
+ return 0;
47
     if (plural >= nplurals)
48
-	return 0;
49
+ return 0;
50
     return plural;
51
 }
52
 
53
@@ -132,35 +134,35 @@
54
 /*
55
  * jiggery-pokery for yacc
56
  *
57
- *	Replace all calls to printf with a call to trace_printf.  The
58
- *	trace_where_ is needed to set the location, and is safe, because
59
- *	yacc only invokes the printf with an if (be careful, the printf
60
- *	is not in a compound statement).
61
+ * Replace all calls to printf with a call to trace_printf.  The
62
+ * trace_where_ is needed to set the location, and is safe, because
63
+ * yacc only invokes the printf with an if (be careful, the printf
64
+ * is not in a compound statement).
65
  */
66
 #define printf trace_where_, trace_printf
67
 
68
 /*
69
  * jiggery-pokery for bison
70
  *
71
- *	Replace all calls to fprintf with a call to yydebugger.  Ignore
72
- *	the first argument, it will be "stderr".  The trace_where_ is
73
- *	needed to set the location, and is safe, because bison only
74
- *	invokes the printf with an if (be careful, the fprintf is not in
75
- *	a compound statement).
76
+ * Replace all calls to fprintf with a call to yydebugger.  Ignore
77
+ * the first argument, it will be "stderr".  The trace_where_ is
78
+ * needed to set the location, and is safe, because bison only
79
+ * invokes the printf with an if (be careful, the fprintf is not in
80
+ * a compound statement).
81
  */
82
 #define fprintf trace_where_, yydebugger
83
 
84
 static void
85
 yydebugger(void *, const char *fmt, ...)
86
 {
87
-	va_list		ap;
88
-	string_ty	*s;
89
+ va_list  ap;
90
+ string_ty *s;
91
 
92
-	va_start(ap, fmt);
93
-	s = str_vformat(fmt, ap);
94
-	va_end(ap);
95
-	trace_printf("%s", s->str_text);
96
-	str_free(s);
97
+ va_start(ap, fmt);
98
+ s = str_vformat(fmt, ap);
99
+ va_end(ap);
100
+ trace_printf("%s", s->str_text);
101
+ str_free(s);
102
 }
103
 
104
 #endif
105
@@ -170,138 +172,139 @@
106
 %%
107
 
108
 grammar:
109
-	nplurals SEMI plural
110
-	;
111
+ nplurals SEMI plural
112
+ ;
113
 
114
 nplurals
115
-	: NPLURALS EQU INTEGER
116
-	    {
117
-		nplurals = $3;
118
-	    }
119
-	;
120
+ : NPLURALS EQU INTEGER
121
+     {
122
+  nplurals = $3;
123
+     }
124
+ ;
125
 
126
 plural
127
-	: PLURAL EQU expr
128
-	    {
129
-		plural = $3;
130
-	    }
131
-	;
132
+ : PLURAL EQU expr
133
+     {
134
+  plural = $3;
135
+     }
136
+ ;
137
 
138
 expr
139
-	: LP expr RP
140
-	    {
141
-		$$ = $2;
142
-		trace(("$$ = %u;\n", $$));
143
-	    }
144
-	| NUMBER
145
-	    {
146
-		$$ = number;
147
-		trace(("$$ = %u;\n", $$));
148
-	    }
149
-	| INTEGER
150
-	    {
151
-		$$ = $1;
152
-		trace(("$$ = %u;\n", $$));
153
-	    }
154
-	| MINUS expr
155
-	    %prec UNARY
156
-	    {
157
-		$$ = -$2;
158
-		trace(("$$ = %u;\n", $$));
159
-	    }
160
-	| expr PLUS expr
161
-	    {
162
-		$$ = $1 + $3;
163
-		trace(("$$ = %u;\n", $$));
164
-	    }
165
-	| expr MINUS expr
166
-	    {
167
-		$$ = $1 - $3;
168
-		trace(("$$ = %u;\n", $$));
169
-	    }
170
-	| expr MUL expr
171
-	    {
172
-		$$ = $1 * $3;
173
-		trace(("$$ = %u;\n", $$));
174
-	    }
175
-	| expr DIV expr
176
-	    {
177
-		$$ = $3 ? $1 / $3 : 0;
178
-		trace(("$$ = %u;\n", $$));
179
-	    }
180
-	| expr MOD expr
181
-	    {
182
-		$$ = $3 ? $1 % $3 : 0;
183
-		trace(("$$ = %u;\n", $$));
184
-	    }
185
-	| expr EQ expr
186
-	    {
187
-		$$ = ($1 == $3);
188
-		trace(("$$ = %u;\n", $$));
189
-	    }
190
-	| expr NE expr
191
-	    {
192
-		$$ = ($1 != $3);
193
-		trace(("$$ = %u;\n", $$));
194
-	    }
195
-	| expr LT expr
196
-	    {
197
-		$$ = ($1 < $3);
198
-		trace(("$$ = %u;\n", $$));
199
-	    }
200
-	| expr LE expr
201
-	    {
202
-		$$ = ($1 <= $3);
203
-		trace(("$$ = %u;\n", $$));
204
-	    }
205
-	| expr GT expr
206
-	    {
207
-		$$ = ($1 > $3);
208
-		trace(("$$ = %u;\n", $$));
209
-    	    }
210
-	| expr GE expr
211
-	    {
212
-		$$ = ($1 >= $3);
213
-		trace(("$$ = %u;\n", $$));
214
-	    }
215
-	| NOT expr
216
-	    {
217
-		$$ = (!$2);
218
-		trace(("$$ = %u;\n", $$));
219
-	    }
220
-	| BITNOT expr
221
-	    {
222
-		$$ = ~$2;
223
-		trace(("$$ = %u;\n", $$));
224
-	    }
225
-	| expr ANDAND expr
226
-	    {
227
-		$$ = $1 && $3;
228
-		trace(("$$ = %u;\n", $$));
229
-	    }
230
-	| expr BITAND expr
231
-	    {
232
-		$$ = $1 & $3;
233
-		trace(("$$ = %u;\n", $$));
234
-	    }
235
-	| expr OROR expr
236
-	    {
237
-		$$ = $1 || $3;
238
-		trace(("$$ = %u;\n", $$));
239
-	    }
240
-	| expr BITOR expr
241
-	    {
242
-		$$ = $1 | $3;
243
-		trace(("$$ = %u;\n", $$));
244
-	    }
245
-	| expr BITXOR expr
246
-	    {
247
-		$$ = $1 ^ $3;
248
-		trace(("$$ = %u;\n", $$));
249
-	    }
250
-	| expr QUEST expr COLON expr
251
-	    {
252
-		$$ = $1 ? $3 : $5;
253
-		trace(("$$ = %u;\n", $$));
254
-	    }
255
-	;
256
+ : LP expr RP
257
+     {
258
+  $$ = $2;
259
+  trace(("$$ = %u;\n", $$));
260
+     }
261
+ | NUMBER
262
+     {
263
+  $$ = number;
264
+  trace(("$$ = %u;\n", $$));
265
+     }
266
+ | INTEGER
267
+     {
268
+  $$ = $1;
269
+  trace(("$$ = %u;\n", $$));
270
+     }
271
+ | MINUS expr
272
+     %prec UNARY
273
+     {
274
+  $$ = -$2;
275
+  trace(("$$ = %u;\n", $$));
276
+     }
277
+ | expr PLUS expr
278
+     {
279
+  $$ = $1 + $3;
280
+  trace(("$$ = %u;\n", $$));
281
+     }
282
+ | expr MINUS expr
283
+     {
284
+  $$ = $1 - $3;
285
+  trace(("$$ = %u;\n", $$));
286
+     }
287
+ | expr MUL expr
288
+     {
289
+  $$ = $1 * $3;
290
+  trace(("$$ = %u;\n", $$));
291
+     }
292
+ | expr DIV expr
293
+     {
294
+  $$ = $3 ? $1 / $3 : 0;
295
+  trace(("$$ = %u;\n", $$));
296
+     }
297
+ | expr MOD expr
298
+     {
299
+  $$ = $3 ? $1 % $3 : 0;
300
+  trace(("$$ = %u;\n", $$));
301
+     }
302
+ | expr EQ expr
303
+     {
304
+  $$ = ($1 == $3);
305
+  trace(("$$ = %u;\n", $$));
306
+     }
307
+ | expr NE expr
308
+     {
309
+  $$ = ($1 != $3);
310
+  trace(("$$ = %u;\n", $$));
311
+     }
312
+ | expr LT expr
313
+     {
314
+  $$ = ($1 < $3);
315
+  trace(("$$ = %u;\n", $$));
316
+     }
317
+ | expr LE expr
318
+     {
319
+  $$ = ($1 <= $3);
320
+  trace(("$$ = %u;\n", $$));
321
+     }
322
+ | expr GT expr
323
+     {
324
+  $$ = ($1 > $3);
325
+  trace(("$$ = %u;\n", $$));
326
+         }
327
+ | expr GE expr
328
+     {
329
+  $$ = ($1 >= $3);
330
+  trace(("$$ = %u;\n", $$));
331
+     }
332
+ | NOT expr
333
+     {
334
+  $$ = (!$2);
335
+  trace(("$$ = %u;\n", $$));
336
+     }
337
+ | BITNOT expr
338
+     {
339
+  $$ = ~$2;
340
+  trace(("$$ = %u;\n", $$));
341
+     }
342
+ | expr ANDAND expr
343
+     {
344
+  $$ = $1 && $3;
345
+  trace(("$$ = %u;\n", $$));
346
+     }
347
+ | expr BITAND expr
348
+     {
349
+  $$ = $1 & $3;
350
+  trace(("$$ = %u;\n", $$));
351
+     }
352
+ | expr OROR expr
353
+     {
354
+  $$ = $1 || $3;
355
+  trace(("$$ = %u;\n", $$));
356
+     }
357
+ | expr BITOR expr
358
+     {
359
+  $$ = $1 | $3;
360
+  trace(("$$ = %u;\n", $$));
361
+     }
362
+ | expr BITXOR expr
363
+     {
364
+  $$ = $1 ^ $3;
365
+  trace(("$$ = %u;\n", $$));
366
+     }
367
+ | expr QUEST expr COLON expr
368
+     {
369
+  $$ = $1 ? $3 : $5;
370
+  trace(("$$ = %u;\n", $$));
371
+     }
372
+ ;
373
+// vim: set ts=8 sw=4 et :

Return to bug 247363