summaryrefslogtreecommitdiff
path: root/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/parser.y b/parser.y
index e698e47..2ec2264 100644
--- a/parser.y
+++ b/parser.y
@@ -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