diff options
author | wukong <rebirthmonkey@gmail.com> | 2015-11-23 17:48:48 +0100 |
---|---|---|
committer | wukong <rebirthmonkey@gmail.com> | 2015-11-23 17:48:48 +0100 |
commit | fca74d4bc3569506a6659880a89aa009dc11f552 (patch) | |
tree | 4cefd06af989608ea8ebd3bc6306889e2a1ad175 /moon-abe/pbc-0.5.14/pbc/parser.lex | |
parent | 840ac3ebca7af381132bf7e93c1e4c0430d6b16a (diff) |
moon-abe cleanup
Change-Id: Ie1259856db03f0b9e80de3e967ec6bd1f03191b3
Diffstat (limited to 'moon-abe/pbc-0.5.14/pbc/parser.lex')
-rw-r--r-- | moon-abe/pbc-0.5.14/pbc/parser.lex | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/moon-abe/pbc-0.5.14/pbc/parser.lex b/moon-abe/pbc-0.5.14/pbc/parser.lex deleted file mode 100644 index 1d0b9f23..00000000 --- a/moon-abe/pbc-0.5.14/pbc/parser.lex +++ /dev/null @@ -1,56 +0,0 @@ -%{ -#include <stdarg.h> -#include <stdio.h> -#include <stdint.h> // for intptr_t -#include <gmp.h> -#include "pbc_utils.h" -#include "pbc_field.h" - -#include "pbc_tree.h" -#define YYSTYPE tree_ptr -#include "parser.tab.h" - -extern int option_easy; - -%} - -%option nounput noinput - -%x COMMENT -%% -\/\* BEGIN(COMMENT); // Open C-style comment. -<COMMENT>\*\/ BEGIN(0); // Close C-style comment. -<COMMENT>. // Within a C-style comment. -<COMMENT>\n // Within a C-style comment. -#.*$ // Comment. -[ \t\r]* // Whitespace. - -define return DEFINE; -[0-9]+ yylval = tree_new_z(yytext); return NUM; -[a-zA-Z_][a-zA-Z0-9_]* yylval = tree_new_id(yytext); return ID; -:= return ASSIGN; -== return EQ; -!= return NE; -\< return LT; -\> return T_GT; -\<= return LE; -\>= return GE; -\+ return PLUS; -- return MINUS; -\/ return DIVIDE; -\* return TIMES; -\^ return POW; -; return TERMINATOR; -\, return COMMA; -\? return QUESTION; -: return COLON; -\( return LPAR; -\) return RPAR; -\[ return LSQU; -\] return RSQU; -\{ return LBRACE; -\} return RBRACE; -\n if (option_easy) return TERMINATOR; -= return option_easy ? ASSIGN : UNKNOWN; -. return UNKNOWN; -%% |