repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove building with NOCRYPTO option
[minix3.git]
/
external
/
bsd
/
byacc
/
dist
/
test
/
err_syntax22.y
blob
5144e6368fd92f89d91d0b908ae2e6138d181619
1
/* $NetBSD: err_syntax22.y,v 1.1.1.1 2015/01/03 22:58:23 christos Exp $ */
2
3
%
{
4
int
yylex
(
void
);
5
static void
yyerror
(
const char
*);
6
%
}
7
8
%
union
{
9
int
ival
;
10
double
dval
;
11
}
12
13
%token NUMBER
14
%type
<
dval
>
expr
15
16
%%
17
18
expr
:
'('
recur
')'
19
{
foo
(
$$
=
$2
); }
20
;
21
22
recur
:
NUMBER
23
;
24
25
%%
26
27
#include <stdio.h>
28
29
int
30
main
(
void
)
31
{
32
printf
(
"yyparse() = %d
\n
"
,
yyparse
());
33
return
0
;
34
}
35
36
int
37
yylex
(
void
)
38
{
39
return
-
1
;
40
}
41
42
static void
43
yyerror
(
const char
*
s
)
44
{
45
printf
(
"%s
\n
"
,
s
);
46
}