the last instruction fails to parse if it's a zero operand instruction #15

Closed
opened 2025-04-15 23:22:34 +00:00 by omicron · 1 comment
Owner

The following program produces the following incorrect parse tree (final NODE_LABEL should be NODE_INSTRUCTION).

; initial basic input to test encoding

.export _start

_start:
    ret
NODE_PROGRAM
  NODE_DIRECTIVE
    NODE_DOT "."
    NODE_EXPORT_DIRECTIVE
      NODE_EXPORT "export"
      NODE_IDENTIFIER "_start"
  NODE_LABEL
    NODE_IDENTIFIER "_start"
    NODE_COLON ":"
  NODE_LABEL
    NODE_IDENTIFIER "ret"
The following program produces the following incorrect parse tree (final NODE_LABEL should be NODE_INSTRUCTION). ```asm ; initial basic input to test encoding .export _start _start: ret ``` ``` NODE_PROGRAM NODE_DIRECTIVE NODE_DOT "." NODE_EXPORT_DIRECTIVE NODE_EXPORT "export" NODE_IDENTIFIER "_start" NODE_LABEL NODE_IDENTIFIER "_start" NODE_COLON ":" NODE_LABEL NODE_IDENTIFIER "ret" ```
omicron added the
bug
label 2025-04-15 23:22:34 +00:00
Author
Owner

fixed by #17

fixed by #17
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: omicron/oas#15
No description provided.