ISSOtm
9e3d7a50e6
Handle comments in line continuations
2020-10-04 04:46:00 +02:00
ISSOtm
e33c2ad6a2
Fix INCLUDE ignoring -MG
2020-10-04 04:46:00 +02:00
ISSOtm
615f1072d9
Fix readFractionalPart never shifting characters
2020-10-04 04:46:00 +02:00
ISSOtm
f7b7a97407
Prevent expanding macro args in comments
...
Also use a cleaner way, instead of hardcoding to capture
2020-10-04 04:46:00 +02:00
ISSOtm
ece6853e0f
Implement opt b and opt g
2020-10-04 04:46:00 +02:00
ISSOtm
b7b03ee451
Fix "REPT 0" not being a no-op
2020-10-04 04:45:59 +02:00
ISSOtm
f9b48c0cad
Fix else working incorrectly from macros
...
Since the "skip ELSE blocks" variable is global, it used to get carried
over from the macro's `if` to the outer's.
2020-10-04 04:45:59 +02:00
ISSOtm
aa76603da9
Add line+col trace info to lexer
2020-10-04 04:45:59 +02:00
ISSOtm
b83b9825f8
Fix _NARG crashing outside of macros
...
And add a test for it
2020-10-04 04:45:59 +02:00
ISSOtm
d641972cde
Fix macro args not being restored when exiting macros
2020-10-04 04:45:59 +02:00
ISSOtm
4d1333e124
Fix incorrect error reporting of INCLUDEd files
2020-10-04 04:45:59 +02:00
ISSOtm
35396e6410
Fix files being unmapped when still referenced by macros
2020-10-04 04:45:59 +02:00
ISSOtm
8d18b39eee
Support missing register tokens
...
Made possible by #491
2020-10-04 04:45:59 +02:00
ISSOtm
ae77893021
Fix file name reporting
...
As noted in the function's code, this is very error-prone, but
will do the job; this needs rewriting due to #491 anyways, so, temporary.
2020-10-04 04:45:59 +02:00
ISSOtm
baeb180acd
Apply error reporting changes to tests
2020-10-04 04:45:58 +02:00
ISSOtm
fd02ffb7bd
Implement __FILE__ symbol
...
Also clean up built-in symbol creation
This is not great, but currently okay.
Should be fixed later, like the rest...
2020-10-04 04:45:58 +02:00
ISSOtm
62ecdce0b0
Fix line-continuation-macro test
2020-10-04 04:45:58 +02:00
ISSOtm
e4f2fad215
Support line continuations in main scope
2020-10-04 04:45:58 +02:00
ISSOtm
3f5f9bcaf0
Fix numeric constant overflow checks
2020-10-04 04:45:58 +02:00
ISSOtm
08867b3cec
Enable catching invalid macro arg 0
2020-10-04 04:45:55 +02:00
ISSOtm
9081feab51
Reinstate macro arg scan distance
...
Used to be broken, so it was removed, but doing so prevents escaping them.
So it was instead put back in, but with corrected behavior
2020-10-04 04:39:27 +02:00
ISSOtm
cf992164f7
Fix lexer capture sometimes not being reset
2020-10-04 04:39:27 +02:00
ISSOtm
b27b821e7f
Fix RAW lexer length underflow
...
Also added an assertion to check against more such overflows
2020-10-04 04:39:26 +02:00
ISSOtm
d9ecaabac1
Add debug tracing code to lexer
...
Hidden behind a #define, like YYDEBUG
2020-10-04 04:39:26 +02:00
ISSOtm
cd747d8175
Fix many lexer bugs
...
More to come...
2020-10-04 04:39:25 +02:00
ISSOtm
df75fd2ec2
Fix expansion reporting being incorrect
2020-10-04 04:38:53 +02:00
ISSOtm
adcaf4cd46
Fix crash when no macro args are being used
2020-10-04 04:38:53 +02:00
ISSOtm
81a77a9b88
Re-implement block copy to avoid expanding macro args
...
They were expanded during the capture, and there was no easy way to
avoid expanding them (believe me, after three hours and somehow an OOM, I
gave up trying).
2020-10-04 04:38:53 +02:00
ISSOtm
6e805cd318
Implement macro args
...
This finally allows running 90% of the test suite, debugging time!
2020-10-04 04:38:53 +02:00
ISSOtm
e11f25024e
Add test for built-in file symbol
...
It's currently defined in fstack.c, making it more prone to accidental
dropping. Let's not repeat the 0.3.9 scenario...
2020-10-04 04:38:53 +02:00
ISSOtm
7c895f8a1b
Fix diagnostic formatting
...
Missing colon and space after the file stack
2020-10-04 04:38:53 +02:00
ISSOtm
38bda7e1bb
Fix string expansion reporting
...
More expansions were allowed than the limit specified, and reporting code
did not account for the extra one that caused overflow
2020-10-04 04:38:52 +02:00
ISSOtm
149db9a022
Fix incorrect freeing of expansions
...
Freeing an expansion should free its children, not its siblings...
Fixes a use-after-free reported by scan-build. Nice catch!
2020-10-04 04:38:52 +02:00
ISSOtm
fed252bc49
Fix nested expansions being incorrectly handled
...
The biggest problem was simply that the length of children expansions was
not accounted for when skipping over the parent... this took a lot of
arduous debugging, but it finally works!
2020-10-04 04:38:52 +02:00
ISSOtm
61b2fd9816
Add string expansion reporting
...
And fix line counting with expansion-made newlines.
This has the same bug as the old lexer (equs-newline's output does not
print the second warning as being part of the expansion).
Additionally, we regress equs-recursion, as we are no longer able to
catch this specific EQUS recursion. Simply enough, the new expansion
begins **after** the old one ends! I have found no way to handle that.
2020-10-04 04:38:52 +02:00
ISSOtm
5ad7a93750
Add EQUS expansion
2020-10-04 04:38:52 +02:00
ISSOtm
2ec10012b6
Fix mmap read offset not being initialized
2020-10-04 04:38:52 +02:00
ISSOtm
e56c6cc291
Fix PC's name not being passed to parser
2020-10-04 04:38:52 +02:00
ISSOtm
4c9a929a14
Implement almost all functionality
...
Add keywords and identifiers
Add comments
Add number literals
Add strings
Add a lot of new tokens
Add (and clean up) IF etc.
Improve reporting of unexpected chars / garbage bytes
Fix bug with and improved error messages when failing to open file
Add verbose-level messages about how files are opened
Enforce that files finish with a newline
Fix chars returned not being cast to unsigned char (may conflict w/ EOF)
Return null path when no file is open, rather than crash
Unify and improve error printing slightly
Known to be missing: macro expansion, REPT blocks, EQUS expansions
2020-10-04 04:38:50 +02:00
ISSOtm
71f8871702
Implement more functionality
...
Macro arg detection, first emitted tokens, primitive (bad) column counting
2020-10-04 04:37:58 +02:00
ISSOtm
6dc4ce6599
Implement infrastructure around new lexer
...
The lexer itself is very much incomplete, but this is intended to be a
safe point to revert to should further implementation go south.
2020-10-04 04:37:58 +02:00
Eldred Habert
3a44cc7722
Merge pull request #582 from ISSOtm/rewrite-charmap
...
Rewrite charmap system
2020-10-04 04:37:06 +02:00
ISSOtm
4cfed3c98f
Rewrite charmap system
...
Avoid allocating a *ton* of data per charmap
Stop relying on uninitialized data in charmap nodes
Only initialize charmap nodes lazily
2020-10-04 04:31:10 +02:00
Eldred Habert
6af57ff026
Merge pull request #581 from JL2210/cmake-docs
...
Install manpages with CMake
2020-10-03 22:15:17 +02:00
ISSOtm
2e3db9d56a
Clean up label generation
...
Only check for localness when we already know we have a local
2020-10-03 21:33:30 +02:00
ISSOtm
f53ad359a6
Remove whoami step from Windows CI
...
A carry-over from testing
2020-10-03 02:17:18 +02:00
ISSOtm
84de86beb5
Enable make develop on Ubuntu 20.04 CI as well
2020-10-03 01:05:09 +02:00
Eldred Habert
04e7af2675
Merge pull request #579 from ISSOtm/cmake-ci
...
Enable CMake in CI
2020-10-02 23:30:26 +02:00
Eldred Habert
4f13a336b9
Merge pull request #578 from JL2210/cmake-pkgconfig
...
Use pkg-config to detect libpng
2020-10-02 22:30:30 +02:00
ISSOtm
03508119e5
Use CMake in CI as well
2020-10-02 22:24:02 +02:00
ISSOtm
8e4a9a5c21
Remove assertions from release builds
...
I believe the CMakeLists already did that, but the Makefile did not.
2020-09-27 17:05:52 +02:00
ISSOtm
a1286e6f0e
Make newlines explicit in error messages
...
In preparation for a change a PR is about to make
2020-09-27 10:54:06 +02:00
ISSOtm
c0808246e5
Silence the mingw test
...
Use "quiet" instead of "count"...
2020-09-27 10:51:52 +02:00
ISSOtm
ba051e10fb
Factor printing assert failures into functions
...
Saves some code duplication
2020-09-27 09:24:24 +02:00
ISSOtm
9fee0603b1
Fix typo in object file format doc
...
Thanks @ax6!
2020-09-24 16:43:13 +02:00
ISSOtm
be8ebe6db9
Fix master docs update CI script
...
GitHub documentation about the syntax is unclear, this should be right
according to the examples I saw.
2020-09-24 16:41:23 +02:00
ISSOtm
548e3dc31c
Correct previously-introduced test being a no-op
...
Forgot to invoke the macro due to a copy-paste error
2020-09-24 16:35:45 +02:00
ISSOtm
9440086d77
Add a test for purging a macro while running
...
This could cause a crash if the macro name is then used for error reporting
2020-09-24 16:14:18 +02:00
ISSOtm
ec5a1bc71f
Fix incorrect obj file documentation
...
Bit 7 of section types was actually documented in the symbol type
Bit 6 of section types was not documented at all
2020-09-24 10:26:02 +02:00
ISSOtm
9742fa731c
Run the quote in file name except on Windows
...
This should make the CI function again
2020-09-22 18:13:26 +02:00
ISSOtm
91a3c538d9
Enable running regression tests on PRs as well
2020-09-22 17:27:29 +02:00
ISSOtm
e98485da3f
Make code style errors fail their CI job
...
Mimics the behavior of the old Travis script
2020-09-22 02:59:38 +02:00
ISSOtm
6528a955fe
Fix checkpatch in CI
2020-09-22 02:44:24 +02:00
ISSOtm
431f77127e
Also update master docs when updating script
2020-09-22 01:05:49 +02:00
ISSOtm
2cc58723cb
Do not try updating docs if no key is set
...
This will avoid this randomly failing in forks, unless we want to run it
2020-09-22 00:56:14 +02:00
ISSOtm
268219d74e
Avoid warning about /* fallthrough */ comments
...
We do not have `fallthrough;`, so...
2020-09-21 17:46:44 +02:00
ISSOtm
d09ed3e52e
Get rid of flex as a dependency in CMakeLists
...
It will actually not be needed for new lexer
2020-09-20 03:39:53 +02:00
ISSOtm
421d1f5490
Add regression test for #546
...
Check for quotes in `__FILE__`
2020-09-20 00:44:29 +02:00
ISSOtm
66784b7122
Fix documentation not mentioning SECTION FRAGMENTsyntax
2020-09-20 00:06:51 +02:00
ISSOtm
54f2d99ce7
Apply two minor fixes to rgbasm(5)
...
Mustn't → must not
Add a comma to INCBIN sentence to mirror INCLUDE's
2020-09-17 20:45:58 +02:00
ISSOtm
557c799ec9
Update README to point to online install instructions
2020-09-17 03:47:55 +02:00
ISSOtm
d22a667095
Update help text to redirect to new online docs
2020-09-17 03:10:02 +02:00
ISSOtm
30085a5342
Update documentation link in README
2020-09-16 15:52:36 +02:00
ISSOtm
304e6c4279
Sync redirect page generation with site
2020-09-16 06:25:46 +02:00
ISSOtm
12458aae6f
Fix permalinks of index pages
2020-09-16 06:04:38 +02:00
ISSOtm
7e5d9683b1
Use mandoc 1.14.5 in CI
...
This is the version that added -Otoc
2020-09-15 19:24:25 +02:00
ISSOtm
210a4a957a
Get rid of in-repo HTML documentation
...
The online documentation is now managed by a CI hook
2020-09-15 18:39:22 +02:00
ISSOtm
131ad9b315
Fix GitHub link in BUGS sections
2020-09-15 18:35:04 +02:00
ISSOtm
06b4cf57ab
Fix example arguments to -MT appearing as options
2020-09-15 18:32:13 +02:00
ISSOtm
dbefdc923a
Clean up doc post-processor
...
Description blurb is already inline from new stylesheet
`Xr` links are already handled by `mandoc` now
Handle spaces between both dashes in long options
Remove `<head>` modifications, as fragments are generated instead
2020-09-15 18:30:40 +02:00
ISSOtm
37e45de9c1
Improve rendering of pages
...
Make links to other man pages work
Add a table of contents to rgbasm(5)
Make the OS at the bottom of all pages 'Linux'
Apply post-processor that used to be used
2020-09-15 18:27:55 +02:00
ISSOtm
5e63527190
Update repo link at bottom of all man pages
2020-09-15 16:00:17 +02:00
ISSOtm
0cc9026978
Fix docs update action
...
Make script executable (facepalm)
Fix `run**s**-on` typo
Add key using ssh-agent
Force using SSH for pushing back
2020-09-15 15:57:20 +02:00
ISSOtm
bb6a5441ed
Update RGBDS history to mention org move
2020-09-15 15:02:26 +02:00
ISSOtm
0ffda1bf29
Add CI Action to update man pages from master
2020-09-15 15:00:07 +02:00
ISSOtm
304bb9f902
Remove most Hungarian notation in section module
...
Seriously, it sucks.
2020-09-06 20:43:13 +02:00
ISSOtm
14be01880d
Move UNION code inside section.c
...
Improves organization and locality
2020-09-06 19:18:10 +02:00
ISSOtm
12b7cf3cd4
Move curOffset into section code
...
Improves organization
2020-09-06 18:50:19 +02:00
ISSOtm
0d7914bff7
Fix asm/charmap.h not including required header
2020-09-06 17:16:49 +02:00
ISSOtm
d2285953d7
Fix test missed by last PR
...
We need to fix CI
2020-09-03 14:28:28 +02:00
Eldred Habert
d2801505c3
Merge pull request #562 from Rangi42/strsub-0
...
Resolve #554 : STRSUB("<N-char string>", N, 0) will not warn "Position N is past the end of the string"
2020-09-03 12:12:03 +02:00
ISSOtm
9d62b4b9bb
Fix bugs with LOAD section size
...
LOAD blocks did not properly update their parent's size until after closed
Additionally, section size wasn't correctly sanitized inside LOAD blocks
2020-09-03 12:07:12 +02:00
ISSOtm
e05321356b
Fix truncation warning when adding charmap mapping
...
It used to warn when mapping negative values
2020-08-31 21:33:53 +02:00
ISSOtm
0778959e98
Remove arbitrary limits on charmap
...
They were made irrelevant when switching to a trie
2020-08-31 21:26:21 +02:00
Eldred Habert
76331d1c4a
Merge pull request #552 from mattcurrie/incbin-length-optional
...
Make INCBIN's length argument optional
2020-08-23 00:11:54 +02:00
Eldred Habert
9e378ec5cf
Bump license year
...
I feel like there's a 20xx joke to be made here...
2020-08-20 23:02:25 +02:00
ISSOtm
f57d33b17a
Update subprojects in test suite
...
Especially necessary for the "new lexer" branch
2020-08-18 16:40:41 +02:00
Eldred Habert
df27af6d1c
Merge pull request #553 from JL2210/cmake-develop
...
Add DEVELOP option to CMake
2020-08-16 22:12:47 +02:00
ISSOtm
fcfecc6e82
Improve description of @ symbol
...
As requested by someone on GBDev
2020-08-15 15:23:11 +02:00
Eldred Habert
cb4fbdfcd5
Merge pull request #550 from rednex/an/array
...
Refactor warning array for clarity
2020-08-05 10:53:21 +02:00