diff options
Diffstat (limited to 'hcid/lexer.l')
-rw-r--r-- | hcid/lexer.l | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hcid/lexer.l b/hcid/lexer.l index a194f708..f4559494 100644 --- a/hcid/lexer.l +++ b/hcid/lexer.l @@ -63,7 +63,9 @@ path (\/{fname})+ string \".*\" hci hci[0-9]+ hextuple [0-9a-zA-Z][0-9a-zA-Z] +hexquad {hextuple}{hextuple} bdaddr {hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple} +id {hexquad}:{hexquad} %x OPTION PARAM @@ -117,7 +119,7 @@ bdaddr {hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple} } {string} { - if(yyleng > sizeof(str_buf) - 1){ + if (yyleng > sizeof(str_buf) - 1) { yyerror("string too long"); return 0; } @@ -139,6 +141,11 @@ bdaddr {hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple}:{hextuple} return PATH; } +{id} { + yylval.str = yytext; + return ID; +} + . { return *yytext; } |