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

Improved label parsing #7

Merged
merged 5 commits into from
Feb 15, 2019
Merged

Conversation

jakoberzar
Copy link
Collaborator

With this PR, SicTools allows more styles of using labels.

Labels in new lines
Currently, only this was allowed:

Label    LDA #10   . Comment

Now SicTools also allows the following examples:

Label              
         LDA #10   . Comment
Label              . Comment
         LDA #10   

Labels at the end of files
Label can also be empty if at the end of file, in which case SicTools now emits a warning but still parses the file.

Support for labels with underscores
Labels can now contain the underscore character, which was previously not allowed as an operand in instructions.

LLVM
With this patch, SicTools becomes compatible with sic-llvm and sic-clang. Therefore compiling from C and compilers with proper LLVM IR output becomes possible.

Newlines are now allowed between the label and the first instruction,
which allows for much clearer code and output from compilers.
If an empty label is found at the end of the file, it is now also treated
only as a warning, meaning it still accepts it.
as address, but not as operand (making jumps to such labels impossible).
@jurem jurem merged commit 1944054 into jurem:master Feb 15, 2019
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

Successfully merging this pull request may close these issues.

2 participants