diff options
author | 2024-11-15 17:25:44 +0600 | |
---|---|---|
committer | 2024-11-15 17:25:44 +0600 | |
commit | 5a02f27098f62f4bfac015c2ed4023715a7d1c33 (patch) | |
tree | 683e7e70bcfc1153a4abb17e6f8dc1942a25258f /src/system.l | |
parent | 2eb3342f0a09b23db4dbf3518778fe7379acccdf (diff) | |
download | log-parser-5a02f27098f62f4bfac015c2ed4023715a7d1c33.tar.gz log-parser-5a02f27098f62f4bfac015c2ed4023715a7d1c33.zip |
Use saner name for types and add location definition
Signed-off-by: Mubashshir <ahmubashshir@gmail.com>
Diffstat (limited to 'src/system.l')
-rw-r--r-- | src/system.l | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/system.l b/src/system.l deleted file mode 100644 index 80c66a2..0000000 --- a/src/system.l +++ /dev/null @@ -1,64 +0,0 @@ -%option c++ -%option noyywrap -%option debug -%option yyclass="Lexer" -%option yylineno - -%{ -#include <iostream> -#include "system.tab.hh" -#include "system.loc.hh" - -#undef YY_DECL -# define YY_DECL template<> parser::symbol_type Lexer<parser::symbol_type>::yynlex () - -using parser = yy::parser; -using namespace std; -%} - -digit [0-9] -num {digit}+ -frc {digit}+\.{digit}+ -%% -{frc} { return parser::make_FRC(atof(yytext_ptr)); } -{num} { return parser::make_NUM(atoi(yytext_ptr)); } - -[\n] { return parser::make_BREAK();} -[\t] { return parser::make_BLANK();} -begin { return parser::make_START(); } -end { return parser::make_END(); } -ver { return parser::make_VERSION(); } -cpu { return parser::make_CPU(); } -base { return parser::make_BASE(); } -user% { return parser::make_USER(); } -nice% { return parser::make_NICE(); } -system% { return parser::make_SYSP(); } -idle% { return parser::make_IDLE(); } -iowait% { return parser::make_IOWP(); } -irq% { return parser::make_IRQP(); } -swirq% { return parser::make_SIRQ(); } -core: { return parser::make_CORE(); } - -mem { return parser::make_MEM(); } -total { return parser::make_TOTAL(); } -avail { return parser::make_AVAIL(); } -cache { return parser::make_CACHE(); } -share { return parser::make_SHARED(); } -swap { return parser::make_SWAP(); } -tswap { return parser::make_TSWAP(); } -uswap { return parser::make_USWAP(); } - -tmp { return parser::make_TEMP(); } -cur { return parser::make_CURR(); } -min { return parser::make_TMIN(); } -max { return parser::make_TMAX(); } -avg { return parser::make_TAVG(); } - -: { return parser::make_COLON(); } -\/ { return parser::make_SLASH(); } - -Package\ id\ {num} {return parser::make_TSENSOR();}; - -. { /* everything else */ } - -%% |