Deleted Added
full compact
scanner.l (162015) scanner.l (172680)
1%{
2/*
3 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that: (1) source code distributions
8 * retain the above copyright notice and this paragraph in its entirety, (2)

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

14 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 * the University nor the names of its contributors may be used to endorse
16 * or promote products derived from this software without specific prior
17 * written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 *
1%{
2/*
3 * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that: (1) source code distributions
8 * retain the above copyright notice and this paragraph in its entirety, (2)

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

14 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
15 * the University nor the names of its contributors may be used to endorse
16 * or promote products derived from this software without specific prior
17 * written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 * $FreeBSD: head/contrib/libpcap/scanner.l 162015 2006-09-04 19:54:21Z sam $
22 * $FreeBSD: head/contrib/libpcap/scanner.l 172680 2007-10-16 02:07:55Z mlaier $
23 */
24
25#ifndef lint
26static const char rcsid[] _U_ =
23 */
24
25#ifndef lint
26static const char rcsid[] _U_ =
27 "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.99.2.4 2005/09/05 09:08:07 guy Exp $ (LBL)";
27 "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.99.2.9 2007/06/11 09:52:05 guy Exp $ (LBL)";
28#endif
29
30#ifdef HAVE_CONFIG_H
31#include "config.h"
32#endif
33
34#include <ctype.h>
35#include <string.h>

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

77extern YYSTYPE yylval;
78
79%}
80
81N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
82B ([0-9A-Fa-f][0-9A-Fa-f]?)
83W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
84
28#endif
29
30#ifdef HAVE_CONFIG_H
31#include "config.h"
32#endif
33
34#include <ctype.h>
35#include <string.h>

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

77extern YYSTYPE yylval;
78
79%}
80
81N ([0-9]+|(0X|0x)[0-9A-Fa-f]+)
82B ([0-9A-Fa-f][0-9A-Fa-f]?)
83W ([0-9A-Fa-f][0-9A-Fa-f]?[0-9A-Fa-f]?[0-9A-Fa-f]?)
84
85%a 16000
86%o 19000
87%e 6000
88%k 4000
89%p 25000
85%a 18400
86%o 21500
87%e 7600
88%k 4550
89%p 27600
90%n 2000
91
92V680 {W}:{W}:{W}:{W}:{W}:{W}:{W}:{W}
93
94V670 ::{W}:{W}:{W}:{W}:{W}:{W}:{W}
95V671 {W}::{W}:{W}:{W}:{W}:{W}:{W}
96V672 {W}:{W}::{W}:{W}:{W}:{W}:{W}
97V673 {W}:{W}:{W}::{W}:{W}:{W}:{W}

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

284
285on|ifname return PF_IFNAME;
286rset|ruleset return PF_RSET;
287rnr|rulenum return PF_RNR;
288srnr|subrulenum return PF_SRNR;
289reason return PF_REASON;
290action return PF_ACTION;
291
90%n 2000
91
92V680 {W}:{W}:{W}:{W}:{W}:{W}:{W}:{W}
93
94V670 ::{W}:{W}:{W}:{W}:{W}:{W}:{W}
95V671 {W}::{W}:{W}:{W}:{W}:{W}:{W}
96V672 {W}:{W}::{W}:{W}:{W}:{W}:{W}
97V673 {W}:{W}:{W}::{W}:{W}:{W}:{W}

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

284
285on|ifname return PF_IFNAME;
286rset|ruleset return PF_RSET;
287rnr|rulenum return PF_RNR;
288srnr|subrulenum return PF_SRNR;
289reason return PF_REASON;
290action return PF_ACTION;
291
292fisu return FISU;
293lssu return LSSU;
294lsu return LSSU;
295msu return MSU;
292sio return SIO;
293opc return OPC;
294dpc return DPC;
295sls return SLS;
296
297[ \r\n\t] ;
298[+\-*/:\[\]!<>()&|=] return yytext[0];
299">=" return GEQ;

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

353 yylval.s = sdup((char *)yytext); return ID; }
354"\\"[^ !()\n\t]+ { yylval.s = sdup((char *)yytext + 1); return ID; }
355[^ \[\]\t\n\-_.A-Za-z0-9!<>()&|=]+ {
356 bpf_error("illegal token: %s", yytext); }
357. { bpf_error("illegal char '%c'", *yytext); }
358%%
359void
360lex_init(buf)
296sio return SIO;
297opc return OPC;
298dpc return DPC;
299sls return SLS;
300
301[ \r\n\t] ;
302[+\-*/:\[\]!<>()&|=] return yytext[0];
303">=" return GEQ;

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

357 yylval.s = sdup((char *)yytext); return ID; }
358"\\"[^ !()\n\t]+ { yylval.s = sdup((char *)yytext + 1); return ID; }
359[^ \[\]\t\n\-_.A-Za-z0-9!<>()&|=]+ {
360 bpf_error("illegal token: %s", yytext); }
361. { bpf_error("illegal char '%c'", *yytext); }
362%%
363void
364lex_init(buf)
361 char *buf;
365 const char *buf;
362{
363#ifdef FLEX_SCANNER
364 in_buffer = yy_scan_string(buf);
365#else
366 in_buffer = buf;
367#endif
368}
369

--- 62 unchanged lines hidden ---
366{
367#ifdef FLEX_SCANNER
368 in_buffer = yy_scan_string(buf);
369#else
370 in_buffer = buf;
371#endif
372}
373

--- 62 unchanged lines hidden ---