diff options
Diffstat (limited to 'src/build.l')
| -rw-r--r-- | src/build.l | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/build.l b/src/build.l index 3107431..b174681 100644 --- a/src/build.l +++ b/src/build.l | |||
| @@ -18,43 +18,24 @@ std::string strbuf; | |||
| 18 | %} | 18 | %} |
| 19 | %% | 19 | %% |
| 20 | 20 | ||
| 21 | [,:=] return yytext[0]; | 21 | [,:=[\]] return yytext[0]; |
| 22 | "+=" return TOK_ADDSET; | 22 | "+=" return TOK_ADDSET; |
| 23 | 23 | ||
| 24 | "default" return TOK_DEFAULT; | 24 | "default" return TOK_DEFAULT; |
| 25 | "action" return TOK_ACTION; | 25 | "action" return TOK_ACTION; |
| 26 | "create" return TOK_CREATE; | ||
| 27 | "file" return TOK_FILE; | ||
| 28 | "from" return TOK_FROM; | ||
| 29 | "files" return TOK_FILES; | ||
| 30 | "in" return TOK_IN; | ||
| 31 | "using" return TOK_USING; | ||
| 32 | "rule" return TOK_RULE; | 26 | "rule" return TOK_RULE; |
| 33 | "requires" return TOK_REQUIRES; | 27 | "requires" return TOK_REQUIRES; |
| 34 | "for" return TOK_FOR; | ||
| 35 | "set" return TOK_SET; | 28 | "set" return TOK_SET; |
| 36 | "matches" return TOK_MATCHES; | 29 | "matches" return TOK_MATCHES; |
| 37 | "matching" return TOK_MATCHING; | ||
| 38 | "all" return TOK_ALL; | ||
| 39 | "one" return TOK_ONE; | ||
| 40 | "perform" return TOK_PERFORM; | 30 | "perform" return TOK_PERFORM; |
| 41 | "produces" return TOK_PRODUCES; | 31 | "produces" return TOK_PRODUCES; |
| 42 | "command" return TOK_COMMAND; | ||
| 43 | "check" return TOK_CHECK; | 32 | "check" return TOK_CHECK; |
| 44 | "clean" return TOK_CLEAN; | 33 | "clean" return TOK_CLEAN; |
| 45 | "directories" return TOK_DIRECTORIES; | ||
| 46 | "targets" return TOK_TARGETS; | ||
| 47 | 34 | ||
| 48 | "..."\n { | ||
| 49 | yylloc->last_line += 1; | ||
| 50 | yylloc->first_line = yylloc->last_line; | ||
| 51 | yylloc->first_column = yylloc->last_column = 0; | ||
| 52 | } | ||
| 53 | \n+ { | 35 | \n+ { |
| 54 | yylloc->last_line += yyleng; | 36 | yylloc->last_line += yyleng; |
| 55 | yylloc->first_line = yylloc->last_line; | 37 | yylloc->first_line = yylloc->last_line; |
| 56 | yylloc->first_column = yylloc->last_column = 0; | 38 | yylloc->first_column = yylloc->last_column = 0; |
| 57 | return TOK_EOL; | ||
| 58 | } | 39 | } |
| 59 | 40 | ||
| 60 | [ \t\r]* { | 41 | [ \t\r]* { |
| @@ -77,17 +58,6 @@ std::string strbuf; | |||
| 77 | 58 | ||
| 78 | "#".* /* single line comment */ | 59 | "#".* /* single line comment */ |
| 79 | 60 | ||
| 80 | [^ \t\r\n\'\":+=,/][^ \t\r\n\'\":+=,]* { | ||
| 81 | yylval->strval = stringdup( yytext ); | ||
| 82 | return STRING; | ||
| 83 | } | ||
| 84 | |||
| 85 | [^ \t\r\n\'\":+=,/][^ \t\r\n\'\"+=,]+[^ \t\r\n\'\":+=,] { | ||
| 86 | yylval->strval = stringdup( yytext ); | ||
| 87 | return STRING; | ||
| 88 | } | ||
| 89 | |||
| 90 | |||
| 91 | \" { | 61 | \" { |
| 92 | BEGIN( strdq ); | 62 | BEGIN( strdq ); |
| 93 | strbuf = ""; | 63 | strbuf = ""; |
