t40c term[] count fix
[minix.git] / commands / devmand / usb_scan.l
blob0c77f2d498dcee46e4308c64cd1ae10669fbefd4
1 /* -*- indented-text -*- */
2 %option noinput
3 %option nounput
4 %{
5 #include "y.tab.h"
6 #include <string.h>
9 #if 0
10 #define ECHO fwrite(yytext, yyleng, 1, yyout)
11 #else
12 #define ECHO
13 #endif
15 BO              [{]
16 BC              [}]
17 NL              [\n]
18 SC              [;]
19 CHAR            [0-9a-zA-Z_/\-\*\.]
20 EQ              [=]
21 SPACE           [\032]
24 usb_driver         { ECHO; return USB_DRIVER;}
25 devprefix          { ECHO; return DEV_PREFIX;}
26 devtype            { ECHO; return DEV_TYPE;}
27 char               { ECHO; return BLOCK_DEV;}
28 block              { ECHO; return CHAR_DEV;}
29 binary             { ECHO; return BINARY;}
30 bInterfaceClass    { ECHO; return INTERFACE_CLASS;}
31 bInterfaceSubClass { ECHO; return INTERFACE_SUB_CLASS;}
32 bInterfaceProtocol { ECHO; return INTERFACE_PROTOCOL;}
33 id                 { ECHO; return ID;}
34 upscript           { ECHO; return UPSCRIPT;}
35 downscript         { ECHO; return DOWNSCRIPT;}
36 {EQ}               { ECHO; return EQUALS;}
37 {SC}               { ECHO; return SEMICOLON;}
38 {BO}               { ECHO; return BRACKET_OPEN;}
39 {BC}               { ECHO; return BRACKET_CLOSE;}
40 {CHAR}+            { ECHO; yylval.string = (char *)strdup(yytext); return STRING;}
41 .               ;