1%{
2/*
3 * Copyright (c) 2003
4 * Bill Paul <wpaul@windriver.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 18 unchanged lines hidden (view full) ---
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/usr.sbin/ndiscvt/inf-token.l 228665 2011-12-17 22:16:27Z dim $");
36
37#include <regex.h>
38#include <ctype.h>
39#include <err.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include "y.tab.h"
44
45int lineno = 1;
46#define YY_NO_UNPUT
47#define YY_NO_INPUT
48
49int yylex(void);
50void yyerror(const char *);
51
52static void
53update_lineno(const char *cp)
54{
55 while (*cp)
56 if (*cp++ == '\n')
57 lineno++;
58}
59
60%}
61
62%%
63
64[ \t]+ ;
65\n { lineno++; return EOL; }
66\r ;
67;.*$ ;
68\/\/.*$ ;
69= { return EQUALS; }
--- 61 unchanged lines hidden ---
2/*
3 * Copyright (c) 2003
4 * Bill Paul <wpaul@windriver.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 18 unchanged lines hidden (view full) ---
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/usr.sbin/ndiscvt/inf-token.l 228665 2011-12-17 22:16:27Z dim $");
36
37#include <regex.h>
38#include <ctype.h>
39#include <err.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include "y.tab.h"
44
45int lineno = 1;
46#define YY_NO_UNPUT
47#define YY_NO_INPUT
48
49int yylex(void);
50void yyerror(const char *);
51
52static void
53update_lineno(const char *cp)
54{
55 while (*cp)
56 if (*cp++ == '\n')
57 lineno++;
58}
59
60%}
61
62%%
63
64[ \t]+ ;
65\n { lineno++; return EOL; }
66\r ;
67;.*$ ;
68\/\/.*$ ;
69= { return EQUALS; }
--- 61 unchanged lines hidden ---