summaryrefslogtreecommitdiffstats
path: root/hcid/lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'hcid/lexer.l')
-rw-r--r--hcid/lexer.l21
1 files changed, 17 insertions, 4 deletions
diff --git a/hcid/lexer.l b/hcid/lexer.l
index 85cd5780..1947bcd4 100644
--- a/hcid/lexer.l
+++ b/hcid/lexer.l
@@ -24,7 +24,7 @@
/*
* $Id$
- */
+ */
#include <string.h>
@@ -44,16 +44,19 @@ int yyerror(char *str);
hex 0x[0-9a-zA-Z]+
num [0-9]+
-kword [A-Za-z0-9\_\-]+
+kword [A-Za-z0-9\_\-]+
word [A-Za-z0-9\-\_+=\!\$\#\%\&\*\^\@@\\\~\.]+
wordnm {word}:{num}
list ({word}\,*)+
comment \#.*\n
-fname [A-Za-z0-9\_\.\-]+
+fname [A-Za-z0-9\_\.\-]+
path (\/{fname})+
string \".*\"
+hci hci[0-9]+
+hextuple [0-9a-zA-Z][0-9a-zA-Z]
+bdaddr {hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple}
-%x OPTION PARAM
+%x OPTION PARAM
%%
[ \t] {
@@ -70,6 +73,16 @@ string \".*\"
lineno++;
}
+{hci} {
+ yylval.str = yytext;
+ return HCI;
+}
+
+{bdaddr} {
+ yylval.str = yytext;
+ return BDADDR;
+}
+
{hex} {
yylval.num = strtol(yytext, NULL, 16);
return NUM;