Deleted Added
sdiff udiff text old ( 133248 ) new ( 134542 )
full compact
1%{
2/*-
3 * Copyright (c) 1980, 1993
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 the following conditions
8 * are met:

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

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 * @(#)lang.l 8.1 (Berkeley) 6/6/93
31 * $FreeBSD: head/usr.sbin/config/lang.l 134542 2004-08-30 23:03:58Z peter $
32 */
33
34#include <assert.h>
35#include <ctype.h>
36#include <string.h>
37#include "y.tab.h"
38#include "config.h"
39

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

84static int endinclude(void);
85int include(const char *, int);
86int kw_lookup(char *);
87unsigned int octal(const char *);
88unsigned int hex(const char *);
89int yyerror(const char *);
90
91%}
92ID [A-Za-z_][-A-Za-z_0-9]*
93%START TOEOL
94%%
95{ID} {
96 int i;
97
98 BEGIN 0;
99 if ((i = kw_lookup(yytext)) == -1)
100 {
101 yylval.str = strdup(yytext);
102 return ID;
103 }
104 return i;
105 }
106\\\"[^"]+\\\" {
107 BEGIN 0;
108 yytext[yyleng-2] = '"';
109 yytext[yyleng-1] = '\0';
110 yylval.str = strdup(yytext + 1);
111 return ID;
112 }
113\"[^"]+\" {

--- 146 unchanged lines hidden ---