Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Code Parser Error messages #76

Open
endes0 opened this issue Nov 22, 2023 · 0 comments
Open

Inconsistent Code Parser Error messages #76

endes0 opened this issue Nov 22, 2023 · 0 comments

Comments

@endes0
Copy link
Member

endes0 commented Nov 22, 2023

It would be expected that the following codes, which have an erroneously written immediate value, have all the same type of error message.

1
   ADDI R0 R0 #0x0

1
   ADDI R0 R0 #0.0

1
   ADDI R0 R0 #(0)

1
   ADDI R0 R0 0

Instead, there are 3 types of error messages that are thrown:

  • Unknown opcode x0
  • Unable to tokenize the rest of the input: ...
  • Invalid instruction format for ADDI. Expected GeneralRegisterAndInmediate format, got Noop format or similar

Ideally, it should be only one error message, clearly indicating that the immediate value has a wrong format. Arguably, the worst one is the invalid instruction format, that unfortunately seems very common.

Also, this issue is intended for collecting feedbacks of other unclear messages and possible solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant