mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
20 lines
521 B
LLVM
20 lines
521 B
LLVM
%{
|
|
/* #define DEBUG_DEBUG */
|
|
#include <ulib/flex/flexer.h>
|
|
#include <%.h>
|
|
#undef YY_DECL
|
|
#define YY_DECL int UFlexer::yylex(void* yyval)
|
|
#define YY_USER_ACTION ((YYSTYPE*)yyval)->ref.offset = parsed_chars; \
|
|
((YYSTYPE*)yyval)->ref.length = yyleng; parsed_chars += yyleng; \
|
|
((YYSTYPE*)yyval)->ref.ptr = yytext;
|
|
%}
|
|
|
|
%option c++
|
|
%option yyclass="UFlexer" caseless
|
|
%option nounput
|
|
%option nostack
|
|
%option noreject
|
|
%option never-interactive
|
|
%option noyywrap
|
|
%option noyymore
|