all repos — openbox @ 0116e2c4492f18a6b04b5ccf69bf9fd4e9abea7c

openbox fork - make it a bit more like ryudo

util/epist/epist.l (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%{
#include <stdio.h>
#include <string.h>
#include "yacc_parser.hh"

extern YYSTYPE yylval;
    
%}

%%

\{                  return OBRACE;
\}                  return EBRACE;
;                   return SEMICOLON;
-                   return DASH;
Options |
options             return OPTIONS;
Mod1 |
mod1 |
Mod2 |
mod2 |
Mod3 |
mod3 |
Mod4 |
mod4 |
Control |
control |
shift |
Shift               yylval = (int) strdup(yytext); return BINDING;
on |
On |
true |
True                yylval = (int) strdup(yytext); return TRUE;
Off |
off |
false |
False               yylval = (int) strdup(yytext); return FALSE;
[0-9]+              yylval = (int) strdup(yytext); return NUMBER;
\".+\"              yylval = (int) strdup(yytext); return QUOTES;
[a-zA-Z_0-9]+       yylval = (int) strdup(yytext); return WORD;
#.+\n               /* ignore */
\n                  /* ignore */
[ \t]+              /* */
%%