summaryrefslogtreecommitdiff
path: root/openbox/parse.l
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-24 15:35:26 +0000
committerDana Jansens <danakj@orodu.net>2003-05-24 15:35:26 +0000
commitd2857b11944146e2e6973b7f7280cb57e1ee260b (patch)
tree51bf06d58f90953842b0e6babc9493f04934d7d9 /openbox/parse.l
parentf7df74b9cc9369fe401d5622c097e258a124f742 (diff)
ECKS EM ELL
Diffstat (limited to 'openbox/parse.l')
-rw-r--r--openbox/parse.l45
1 files changed, 0 insertions, 45 deletions
diff --git a/openbox/parse.l b/openbox/parse.l
deleted file mode 100644
index a7cd6c63..00000000
--- a/openbox/parse.l
+++ /dev/null
@@ -1,45 +0,0 @@
-%{
-#include "parse.h"
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-extern int lineno;
-%}
-
-real [-0-9][0-9]*\.[0-9]+
-integer [-0-9][0-9]*
-string \"[^"\n]*\"
-identifier [a-zA-Z][-.a-zA-Z0-9_]*
-bool ([tT][rR][uU][eE]|[fF][aA][lL][sS][eE]|[yY][eE][sS]|[nN][oO]|[oO][nN]|[oO][fF][fF])
-
-%%
-
-^[ \t]*#.*\n /* comment */ { ++lineno; }
-^[ \t]*#.* /* comment */
-^[ \t]*\n /* empty lines */ { ++lineno; }
-[ \t] /* whitespace */
-{real} { yylval.real = atof(yytext); return REAL; }
-{integer} { yylval.integer = atoi(yytext); return INTEGER; }
-{string} { yylval.string = g_strdup(yytext+1); /* drop the left quote */
- if (yylval.string[yyleng-2] != '"')
- yyerror("improperly terminated string on line %d");
- else
- yylval.string[yyleng-2] = '\0';
- return STRING;
- }
-{bool} { yylval.bool = (!g_ascii_strcasecmp("true", yytext) ||
- !g_ascii_strcasecmp("yes", yytext) ||
- !g_ascii_strcasecmp("on", yytext));
- return BOOLEAN;
- }
-{identifier} { yylval.identifier = g_strdup(yytext); return IDENTIFIER; }
-[{}()\[\]=,] { yylval.character = *yytext; return *yytext; }
-\n { yylval.character = *yytext; return *yytext; }
-. { return INVALID; }
-
-%%
-
-int yywrap() {
- return 1;
-}