diff options
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -15,6 +15,7 @@ void yyerror(const char *msg) #define MKARGS(...) (struct arguments) { { __VA_ARGS__ } } #define MKARGVALUE(v) (struct argument) { .type = ARG_INTEGER, .value = (v) } #define MKARGLABEL(l) (struct argument) { .type = ARG_LABEL, .label = (l) } +#define MKARGTYPE(t) (struct argument) { .type = (t) } %} @@ -80,6 +81,7 @@ void yyerror(const char *msg) %token T_COMMA "," %token T_COLON ":" +%token T_DOT "." %token T_DEREF "@" %type <inst> inst @@ -178,6 +180,7 @@ reg: T_LABEL { expr: intlit { $$ = MKARGVALUE($1); } | T_LABEL { $$ = MKARGLABEL($1); } + | "." { $$ = MKARGTYPE(ARG_PC); } ; intlit: T_INT |