From 064e6a7b9d3a362e52f96f995d36a85a690dcb26 Mon Sep 17 00:00:00 2001 From: Tom Everett Date: Mon, 29 Feb 2016 19:32:26 -0700 Subject: [PATCH] hm --- antlr/pdp7asm.g4 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/antlr/pdp7asm.g4 b/antlr/pdp7asm.g4 index c1d77d1..0ce3397 100644 --- a/antlr/pdp7asm.g4 +++ b/antlr/pdp7asm.g4 @@ -37,8 +37,7 @@ prog ; line - : (label? declarations? comment? eol) - | eol + : ( label | declarations)* comment? eol ; declarations @@ -69,7 +68,8 @@ atom | DECIMAL | DECIMAL_MINUS | OCTAL - | HEX + | OCTAL_LITERAL + | DECIMAL_LITERAL ; eol @@ -129,8 +129,12 @@ IDENTIFIER : [a-zA-Z]+ ; -HEX - : [0-9a-f]+ +OCTAL_LITERAL + : [0] [0-7]+ + ; + +DECIMAL_LITERAL + : [1-9] [0-9]+ ; DECIMAL