%{ #include "native.h" #include "native-parser.h" #include #define YYSTYPE NSTYPE void yyerror(struct native_parser *parser, const char *fmt, ...); %} %option nounput noinput %option batch never-interactive %option warn %option noyywrap %option reentrant %option bison-bridge %option yylineno %option noyyalloc noyyfree noyyrealloc %option extra-type="struct native_parser *" %option prefix="n" %x label %x args DELIM [ \t]+ NUMBER 0|[1-9][0-9]* WORDS [^\n]+ NEWLINE [\n]+ %% name { BEGIN(label); return TOKEN_NAME; } image { BEGIN(label); return TOKEN_IMAGE; } initrd { BEGIN(label); return TOKEN_INITRD; } args { BEGIN(label); return TOKEN_ARGS; } dtb { BEGIN(label); return TOKEN_DTB; } description { BEGIN(label); return TOKEN_DESCRIPTION; } default { BEGIN(label); return TOKEN_DEFAULT; } dev_description { BEGIN(label); return TOKEN_DEV_DESCRIPTION; } {DELIM} { ; } {NEWLINE} { ; }