diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-02-09 10:08:18 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-02-09 10:08:18 +0000 |
commit | 5ff58cb0e277fb4cb4613aa3d2a83e7237c59894 (patch) | |
tree | 3c455492de694b11e6739c64b9a4fbab7183e5a7 /hcid/lexer.l | |
parent | 16e217b4b13b828a9bb6c372d544deafa0e01f24 (diff) |
Add device specific configuration
Diffstat (limited to 'hcid/lexer.l')
-rw-r--r-- | hcid/lexer.l | 21 |
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; |