35 lines
977 B
LLVM
35 lines
977 B
LLVM
|
|
%option prefix="deviceSpecl"
|
||
|
|
%{
|
||
|
|
#include <vector>
|
||
|
|
#include <deviceManager/deviceManager.h>
|
||
|
|
#include "deviceSpecp.hh"
|
||
|
|
%}
|
||
|
|
|
||
|
|
%%
|
||
|
|
^a {
|
||
|
|
deviceSpecplval.chr = yytext[0];
|
||
|
|
return KEYWORD_SPECTYPE_ACTUATOR;
|
||
|
|
}
|
||
|
|
^e {
|
||
|
|
deviceSpecplval.chr = yytext[0];
|
||
|
|
return KEYWORD_SPECTYPE_EXTROSPECTOR;
|
||
|
|
}
|
||
|
|
^i {
|
||
|
|
deviceSpecplval.chr = yytext[0];
|
||
|
|
return KEYWORD_SPECTYPE_INTEROSPECTOR;
|
||
|
|
}
|
||
|
|
"||" { return DOUBLE_PIPE; }
|
||
|
|
"|" { return PIPE; }
|
||
|
|
"(" { return LPAREN; }
|
||
|
|
")" { return RPAREN; }
|
||
|
|
[^\|\(\) \t\r\n]+ { deviceSpecplval.str = strdup(yytext); return STRING; }
|
||
|
|
\r?\n { /* ignore newlines */ }
|
||
|
|
[ \t]+ { /* ignore whitespace */ }
|
||
|
|
. { return yytext[0]; }
|
||
|
|
%%
|
||
|
|
|
||
|
|
int deviceSpeclwrap(void)
|
||
|
|
{
|
||
|
|
return 1; // Indicate end of input
|
||
|
|
}
|