summaryrefslogtreecommitdiff
path: root/parser.y
Commit message (Collapse)AuthorAgeFilesLines
* nqasm: Handle pc offset argumentsBobby Bingham2017-01-151-14/+20
|
* nqasm: Rename arglist non-terminals to a_*Bobby Bingham2017-01-151-39/+46
| | | | | This will allow differentiation between pcoff (a single argument) and a_pcoff (an argument list consisting of only a pcoff argument).
* nqasm: Handle immediate argumentsBobby Bingham2017-01-151-6/+27
|
* nqasm: Handle register and register indirect argumentsBobby Bingham2017-01-151-49/+45
|
* nqasm: Improve parsing at end of fileBobby Bingham2017-01-151-3/+2
| | | | | | | | | Bison's implicit $accept rule ends with the END token. The fact that input could also end with END (via the line non-terminal) resulted in a shift reduce conflict. We resolve the conflict by modifying the lexer so that if it encounters end of file partway through a line, it produces a final EOL token before EOF.
* nqasm: Initial stab at a lexer and parserBobby Bingham2017-01-151-0/+156
So far, this only understands instructions, but no operands or labels. It doesn't handle bad input gracefully. It's just enough to test the basics.