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_syntax24.y
blob
6d13a01f971d2a95d13cfc9858ddfa8c6ab4f3ec
1
/* $NetBSD: err_syntax24.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
%start expr
14
%type
<
tag2
>
expr
15
16
%token NUMBER
17
18
%%
19
20
expr
:
'('
recur
')'
21
;
22
23
recur
:
NUMBER
24
{
$$
=
1
; }
25
;
26
27
%%
28
29
#include <stdio.h>
30
31
int
32
main
(
void
)
33
{
34
printf
(
"yyparse() = %d
\n
"
,
yyparse
());
35
return
0
;
36
}
37
38
int
39
yylex
(
void
)
40
{
41
return
-
1
;
42
}
43
44
static void
45
yyerror
(
const char
*
s
)
46
{
47
printf
(
"%s
\n
"
,
s
);
48
}