Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | nqasm: lex registers as if they were labels | Bobby Bingham | 2017-01-18 | 1 | -9/+27 |
| | | | | | This makes parsing registers trickier, but allows a label to have a name 'r0'-'r7', which would otherwise conflict with the registers. | ||||
* | nqasm: allow specifying labels for operands | Bobby Bingham | 2017-01-18 | 1 | -40/+24 |
| | |||||
* | nqasm: parse labels | Bobby Bingham | 2017-01-17 | 1 | -2/+11 |
| | |||||
* | nqasm: Fix warnings about missing braces in initializers | Bobby Bingham | 2017-01-15 | 1 | -2/+2 |
| | |||||
* | Switch addpc to use pc-offset instead of immediate operand | Bobby Bingham | 2017-01-15 | 1 | -1/+4 |
| | | | | | This makes more sense, as the argument is really a signed offset from the program counter. | ||||
* | nqasm: Reformat nop grammar | Bobby Bingham | 2017-01-15 | 1 | -2/+1 |
| | |||||
* | nqasm: Handle pc offset arguments | Bobby Bingham | 2017-01-15 | 1 | -14/+20 |
| | |||||
* | nqasm: Rename arglist non-terminals to a_* | Bobby Bingham | 2017-01-15 | 1 | -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 arguments | Bobby Bingham | 2017-01-15 | 1 | -6/+27 |
| | |||||
* | nqasm: Handle register and register indirect arguments | Bobby Bingham | 2017-01-15 | 1 | -49/+45 |
| | |||||
* | nqasm: Improve parsing at end of file | Bobby Bingham | 2017-01-15 | 1 | -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 parser | Bobby Bingham | 2017-01-15 | 1 | -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. |