Deleted Added
sdiff udiff text old ( 62638 ) new ( 78064 )
full compact
1/* $KAME$ */
2
3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 13 unchanged lines hidden (view full) ---

23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $FreeBSD: head/usr.sbin/rrenumd/lexer.l 62638 2000-07-05 11:12:53Z kris $
32 */
33
34%{
35#include <sys/param.h>
36#include <sys/ioctl.h>
37#include <sys/socket.h>
38
39#include <string.h>
40
41#include <net/if.h>
42#if defined(__FreeBSD__) && __FreeBSD__ >= 3
43#include <net/if_var.h>
44#endif /* __FreeBSD__ >= 3 */
45

--- 4 unchanged lines hidden (view full) ---

50#include <arpa/inet.h>
51
52#include "y.tab.h"
53
54int lineno = 1;
55
56#define LINEBUF_SIZE 1000
57char linebuf[LINEBUF_SIZE];
58%}
59
60/* common section */
61nl \n
62ws [ \t]+
63digit [0-9]
64letter [0-9A-Za-z]
65hexdigit [0-9A-Fa-f]

--- 177 unchanged lines hidden (view full) ---

243 yylval.cs.cp = yytext;
244 yylval.cs.len = yyleng;
245 return HOSTNAME;
246 }
247%%
248
249int parse(FILE **fp)
250{
251 yyin = *fp;
252
253 if(yyparse())
254 return(-1);
255
256 return(0);
257
258}
259
260void
261yyerror(const char *s)
262{
263 printf("%s: at %s in line %d\n", s, yytext, lineno);
264}