mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-16 00:00:02 +01:00
19 lines
No EOL
396 B
Text
19 lines
No EOL
396 B
Text
%{
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "boolean.tab.h" // to get the token types that we return
|
|
|
|
%}
|
|
|
|
%option prefix="log_expression_"
|
|
%option noyywrap
|
|
|
|
%%
|
|
|
|
[ \t\n] ; // ignore whitespace
|
|
[&] ; //operators
|
|
[a-b]+ { log_expression_lval.token = strdup(log_expression_text); return TOKEN; }
|
|
[0-9]+ { log_expression_lval.constant = atoi(log_expression_text); return CONSTANT; }
|
|
|
|
%% |