From ccd3273ff020f1daf4815f011394c3531b1ff777 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 13 Jul 2013 13:46:41 -0400 Subject: [PATCH] ranged/count-based ;l listings --- bin/parser.lemon | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/parser.lemon b/bin/parser.lemon index 97a6995..38de27e 100644 --- a/bin/parser.lemon +++ b/bin/parser.lemon @@ -182,6 +182,16 @@ stmt ::= expr(a) SEMIL EOL. Debug::List(a); } +stmt ::= expr(a) AT expr(b) SEMIL EOL. +{ + Debug::List(a, (int)b); +} + +stmt ::= expr(a) COLON expr(b) SEMIL EOL. +{ + Debug::List(a, b); +} + stmt ::= DREGISTER(a) EQ expr(b) EOL. { @@ -232,6 +242,7 @@ unary(rhs) ::= BANG unary(a). { rhs = !a; } unary(rhs) ::= STAR unary(a). [BANG] { rhs = Debug::ReadLong(a); } + term(rhs) ::= LPAREN expr(a) RPAREN. { rhs = a; } term(rhs) ::= INTEGER(a). { rhs = a; } term(rhs) ::= DREGISTER(a). { rhs = cpuGetDReg(a); }