Terminal rules driving me nuts [message #1145742] |
Sat, 19 October 2013 19:09 |
Gary Worsham Messages: 176 Registered: September 2013 |
Senior Member |
|
|
I have some parts of syntax where I need the following flexibility:
equ kfactor 1.3
rdax reg0, 1
rdax 32, -1
rdax reg1, 1.9
rdax reg3, -2.0
rdax reg3, kfactor
rdax reg3, -kfactor
So, arg1 can be an INT or an ID, while arg2 (ultimately resolving to a double) needs to be able to be represented as a +/- INT, +/- REAL, or +/- ID. "+" is never explicitly represented so I just need to accommodate the possibility of "-".
Trying to represent these possibilities as mutually exclusive terminal rules without unintended side effects is making my brain hurt. It seems like I should just explicitly declare terminal rules which could loosely handle what I just stated, and figure out the details in the data validator itself.
Just wondering what the general consensus is, since I read one of the tutorials which recommended against trying to be too clever with terminal rules.
Thanks,
GW
[Updated on: Sat, 19 October 2013 19:30] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03529 seconds