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