3 * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
4 * Copyright (C) Colin Harrison 2005-2008
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * Except as contained in this notice, the name of the XFree86 Project
26 * shall not be used in advertising or otherwise to promote the sale, use
27 * or other dealings in this Software without prior written authorization
28 * from the XFree86 Project.
30 * Authors: Earle F. Philhower, III
38 #include "winprefsyacc.h"
40 extern int yyparse(void);
42 extern void ErrorF (const char* /*f*/, ...);
44 /* Copy the parsed string, must be free()d in yacc parser */
45 static char *makestr(char *str)
48 ptr = (char*)malloc (strlen(str)+1);
51 ErrorF ("winMultiWindowLex:makestr() out of memory\n");
63 %option never-interactive
66 \#.*[\r\n] { /* comment */ return NEWLINE; }
67 \/\/.*[\r\n] { /* comment */ return NEWLINE; }
68 [\r\n] { return NEWLINE; }
69 [ \t]+ { /* ignore whitespace */ }
71 ICONDIRECTORY { return ICONDIRECTORY; }
72 DEFAULTICON { return DEFAULTICON; }
73 ICONS { return ICONS; }
74 STYLES { return STYLES; }
75 TOPMOST { return TOPMOST; }
76 MAXIMIZE { return MAXIMIZE; }
77 MINIMIZE { return MINIMIZE; }
78 BOTTOM { return BOTTOM; }
79 NOTITLE { return NOTITLE; }
80 OUTLINE { return OUTLINE; }
81 NOFRAME { return NOFRAME; }
82 ROOTMENU { return ROOTMENU; }
83 DEFAULTSYSMENU { return DEFAULTSYSMENU; }
84 SYSMENU { return SYSMENU; }
85 SEPARATOR { return SEPARATOR; }
86 ATSTART { return ATSTART; }
87 ATEND { return ATEND; }
89 ALWAYSONTOP { return ALWAYSONTOP; }
90 DEBUG { return DEBUGOUTPUT; }
91 RELOAD { return RELOAD; }
92 TRAYICON { return TRAYICON; }
93 SILENTEXIT { return SILENTEXIT; }
96 "\""[^\"\r\n]+"\"" { yylval.sVal = makestr(yytext+1); \
97 yylval.sVal[strlen(yylval.sVal)-1] = 0; \
99 [^ \t\r\n]+ { yylval.sVal = makestr(yytext); \
104 * Run-of-the mill requirement for yacc
113 * Run a file through the yacc parser
116 parse_file (FILE *file)