ISSOtm
dd8f396227
Fix compiler warnings
...
As reported in #789
2021-04-25 20:40:11 +02:00
ISSOtm
b60853ea21
Fix RGBFIX option parsing on platforms with unsigned char
...
Such as Termux, once again.
2021-04-25 11:05:34 +02:00
ISSOtm
b936ca27ab
Enable _ISOC11_SOURCE
...
See #789
2021-04-23 17:07:52 +02:00
ISSOtm
db1f77f90b
Correct "| operator" line not including the pipe
2021-04-23 14:24:53 +02:00
ISSOtm
6d0a3c75e9
Get rid of Hungarian notation for good
...
Bye bye it was not nice knowing ya
2021-04-19 22:12:10 +02:00
ISSOtm
e35585960c
Avoid generating CRLF'd release tarballs
...
Fixes #841
2021-04-18 23:19:22 +02:00
ISSOtm
432c769d60
Release v0.5.0
2021-04-17 22:53:00 +02:00
ISSOtm
ba3428314b
Add contact info for potential contributors
...
I'm going on a break, but I'll stay available if anyone wants to contribute.
2021-04-13 00:27:49 +02:00
ISSOtm
de7d1facf3
Add assertion that an expansion's total len doesn't overflow
...
Typically not needed because the recursion depth limit should prevent it,
but it might help debug weird lexer issues.
2021-04-03 18:31:30 +02:00
Eldred Habert
7461170956
Add LOAD FRAGMENT pc test ( #800 )
...
Reproduces a reported problem, fix pending
2021-03-28 15:11:20 -04:00
ISSOtm
4216f0a9b0
Init top-level fstack node line number
...
It still gets written to the object file, generating Valgrind warnings
about using uninitialized memory. To silence those errors, and make
output more reproducible, init the line no to a dummy (0) value.
2021-03-25 11:26:58 +01:00
ISSOtm
e3fde986ad
Remove hashmap collision warning
...
It was only used to check hashmap collision rate in the wild,
but it no longer has a purpose and produces spurious messages
2021-03-23 21:34:08 +01:00
ISSOtm
46d6652df1
Fix missing .sym/.map symbols in SECTION UNION/FRAGMENTs
...
Only the first "slice"'s symbols were considered, forgetting some symbols
2021-03-22 23:23:06 +01:00
ISSOtm
5406674cdd
Install groff to build PDFs correctly in CI
2021-03-20 02:09:47 +01:00
ISSOtm
5d2e2e2182
Make docs update script also produce PDFs
...
See rgbds-www#12
2021-03-20 01:53:26 +01:00
ISSOtm
a929f36bc5
Replace UTF-8 hyphens with ASCII ones in man pages
2021-03-20 01:25:17 +01:00
ISSOtm
bdb84a901f
Use sub-sections for the different symbol types
...
This will make them appear in the ToC, and generate HTML anchors for them
2021-03-19 11:04:22 +01:00
ISSOtm
5fb7fcf461
Fix description of rgbgfx -h
...
The old description was backwards and mostly confusing.
2021-03-18 15:35:01 +01:00
ISSOtm
3ca58e13dc
Fix verbose messages claiming non-existent errors
...
They were confusing when trying to debug other things
2021-03-14 18:52:16 +01:00
ISSOtm
aaa4e17454
Add verbose messages for early exit from -MG
...
Should help debugging Make invocations
2021-03-14 18:28:05 +01:00
ISSOtm
60019cf476
Fix a bunch of Clang warnings
...
As reported by #789
Should avoid relying on 32-bit int (for implicit conversions)
and account for more extreme uses of RGBDS.
2021-03-10 10:56:57 +01:00
ISSOtm
5a6a44cbc1
Fix master documentation updater
...
Its path was not synced with a recent change
2021-03-10 01:15:51 +01:00
ISSOtm
b61a187b19
Add forgotten __RGBDS_RC__ symbol
2021-03-10 01:09:18 +01:00
ISSOtm
6382f13647
Release 0.5.0-rc1
2021-03-10 01:04:23 +01:00
ISSOtm
714d39c86f
Make some INCBIN errors non-fatal
2021-03-10 01:02:45 +01:00
ISSOtm
f11241c2ae
Add INCBIN tests
2021-03-10 01:02:45 +01:00
ISSOtm
028e7af7d1
Prepare release candidates
...
We'll use "-rcX" instead of "-pre" to allow multiple ones, jic
Additionally, they will be able to be detected using __RGBDS_RC__
Finally, adapt everything version-related to this new system
2021-03-10 00:06:32 +01:00
ISSOtm
e141da1d94
Compute fallback version string at compile time
2021-03-09 23:59:34 +01:00
ISSOtm
35367282e4
Add workflow to auto-prepare a release
...
Just push a tag beginning with "v" and a number to trigger it
2021-03-09 22:58:42 +01:00
ISSOtm
4c0fa6732e
Fix release doc creation workflow
2021-03-09 22:58:42 +01:00
ISSOtm
e9d9a44687
Make release doc update also register docs
2021-03-09 22:58:42 +01:00
ISSOtm
611bd46e0b
Ignore CRLF vs LF for syntax error test check
2021-03-09 22:58:32 +01:00
ISSOtm
e67254093e
Delete version test if stale
2021-03-09 22:58:00 +01:00
ISSOtm
3ce3d2f662
Explicitly force tested projects to use tested bins
2021-03-09 22:56:59 +01:00
ISSOtm
3da9d81071
Ignore DLLs too
...
Since you may want to put them next to the EXEs here
2021-03-09 22:46:17 +01:00
ISSOtm
40c6b840f8
Add tests for certain directives at EOF without a newline
2021-03-02 16:53:56 -08:00
Eldred Habert
dafef5a953
Remove column 1 restriction for labels with colons ( #635 )
...
Partial fix for #457
2021-02-23 14:42:24 -05:00
ISSOtm
72911ada2d
Prevent non-numeric symbol from overriding refs
...
Fixes #751
2021-02-22 13:00:25 +01:00
ISSOtm
bee62076c6
Allow ENDC at EOF without a newline
2021-02-20 00:51:33 +01:00
ISSOtm
cd072d5e6a
Add assertion check for potential UAF trigger
...
It actually currently triggers if an INCLUDE directive is given at EOF,
but #742 will fix that.
2021-02-19 16:53:30 +01:00
ISSOtm
6ef3ee1391
Give void* ptr to %p formatter
...
Silences a format type mismatch warning
2021-02-19 16:53:26 +01:00
ISSOtm
c29b616f93
Fix forgotten initialization of lexerState->isReferenced
2021-02-18 16:33:06 +01:00
ISSOtm
122ba6eba5
Update deprecated feature examples
...
Those have been removed, lol
2021-02-16 22:09:31 +01:00
ISSOtm
88e1cc7302
Make EOF token name consistent across Bison versions
...
The "end of file" name apparently only became a default recently
2021-02-11 13:04:43 +01:00
ISSOtm
b3c0db218d
Remove "EOF-newline" lexer hack
...
In preparation for an upcoming change
Makes for nicer error messages, complaining about EOF instead of newlines
The hack had to be kept for the lexer raw mode to avoid a bug;
see the relevant code comment for more info.
2021-02-11 12:48:37 +01:00
ISSOtm
76446e6d00
Change behavior of merging FRAGMENTs to constrain each fragment individually
...
Additionally, remove the deprecated merging of non-fragment SECTIONs
2021-02-10 10:19:16 +01:00
ISSOtm
6623b1dc45
Fix CI on macOS
...
Apple supplies version 2.3 (from 2006!!), which doesn't support `%empty`.
2021-01-23 13:45:12 +01:00
ISSOtm
70bbb098d3
Remove stale keywords
...
They were removed from the grammar, but not the lexer
2021-01-23 00:05:56 +01:00
ISSOtm
1926065377
Enable Bison warnings
...
-Wall should be old enough.
Also use %empty instead of comments
2021-01-23 00:05:56 +01:00
ISSOtm
a679e02246
Get rid of asm.h and localasm.h
...
No need to make them global
2021-01-22 13:34:16 +01:00
ISSOtm
592e9b3725
Reorganize and comment better main()
2021-01-22 11:09:27 +01:00
ISSOtm
effc58241d
Rework defining variables on command-line
...
Avoids allocating memory
Detects CLI errors even when failing to open file
Reports symbols as defined on command-line instead of input line 0 (!?)
2021-01-22 11:03:43 +01:00
ISSOtm
3697065afc
Add asm/opt.c to CMakeLists
...
Fixes compiling with CMake
2021-01-22 11:01:33 +01:00
ISSOtm
fa0fa4d5ac
Significantly overhaul OPT code
...
Simplify the mess that was option setting (2 redundant variables !?)
Move options to a separate file
Have "modules" own their options, and OPT only access them (less redundancy)
Simplify code, respect naming conventions better
2021-01-22 10:41:09 +01:00
ISSOtm
5acc48fa54
Error out when given several input files
...
Also rename tzMainFile
2021-01-22 09:44:41 +01:00
ISSOtm
1487eebe79
Remove time counter
...
Nobody uses that, and it requires running extra code for each line
2021-01-22 08:51:57 +01:00
ISSOtm
993c034039
Avoid using EXPAND_AND_STR with external defines
...
There is no guarantee that they are purely numeric, use the values instead
2021-01-22 08:51:35 +01:00
ISSOtm
09f16bda4a
Use putc instead of fputc
...
Also rename some functions for consistency
2021-01-22 08:32:28 +01:00
ISSOtm
41d544a4eb
Rewrite RGBFIX
...
- Make it work inside pipelines
- Add RGBFIX tests to the suite
- Be more flexible in accepted MBC names
- Add warnings for dangerous or nonsensical input params
- Improve man page
2021-01-20 21:22:55 +01:00
ISSOtm
ca1c934629
Have CMake use specified compiler in CI, not system default
...
Otherwise it's just GCC on Linux and Clang on macOS...
2021-01-19 16:35:06 +01:00
ISSOtm
15ec6efc28
Fix missing newline in charmap override warning
2021-01-17 20:13:51 +01:00
ISSOtm
57b734a7df
Reinstate RL into the _RS family
...
Removal of colon-less labels lifted the grammar ambiguity that
prevented `RL` from being usable as a variable declarator.
Thus, reinstate its functionality.
2021-01-11 01:38:03 +01:00
ISSOtm
5be1c0da62
Fix intra-section ALIGN not computing offset correctly
2021-01-09 23:29:08 +01:00
ISSOtm
b598911e96
Enable LTO in release builds
...
Fixes #693
2021-01-09 20:31:15 +01:00
ISSOtm
51ce0b038a
Remove removed features from documentation
2021-01-02 02:47:13 +01:00
ISSOtm
bd244e6865
Remove deprecated features
...
Trimming off the fat!
- GLOBAL and XDEF keywords
- Colon-less global labels
- *-comments
2021-01-02 02:42:44 +01:00
ISSOtm
18f3c8ff9a
Un-document deprecated _PI
2021-01-02 01:43:49 +01:00
ISSOtm
c4fb5591ee
Fix size of unterminated REPT/FOREACH blocks
...
Do not "uncapture" ENDR if it was not read in the first place
2020-12-30 15:52:24 +01:00
ISSOtm
aa27e714d4
Make Bison version detection more portable
...
- POSIX sh actually does NOT support `+=`,
but Bash does even in compatibility mode
- `mawk` does not fully support POSIX EREs (regexes),
so work around its lack of brace support
Fixes building on Debian, apparently.
2020-12-29 22:31:15 +01:00
ISSOtm
7bc42d468b
Clean up temp test files even if interrupted
...
Avoids "tmp.*" piling up in /tmp
2020-12-26 14:38:04 +01:00
ISSOtm
097999cad3
Prevent tests from running if RGBDS hasn't been built
...
Prevents a *lot* of spurious errors due to files not generating
2020-12-26 14:26:50 +01:00
ISSOtm
f82edaa7ec
Make gbdiff.bash handle CRLF sym files gracefully
...
Additionally, reduce the amount of lines piped through `cut`,
improving performance
2020-12-26 02:47:04 +01:00
ISSOtm
d8e8b796e7
Update tested projects to latest commits
...
Compatibility fixes, etc.
2020-12-26 02:02:38 +01:00
ISSOtm
900fd8cabc
Improve gbdiff script
...
Use better constructs where possible
- <<< instead of echo|
- Parameter expansions instead of `cut`
- Etc.
Improves performance and reliability somewhat
Also, accept "d" between diff line info parts
2020-12-26 01:44:45 +01:00
ISSOtm
c20ac35074
Refactor readString
...
Much more readable, and avoids `peek(nz)`
2020-12-19 13:02:05 +01:00
ISSOtm
4ef490f3cb
Avoid interpreting Liquid in doc pages
...
They are auto-generated, so they wouldn't normally contain Liquid
(The post-processor may insert some, but it has control over the `raw` tags)
Some code introduced as examples contains `{{` due to nested brace expansions,
which was interpreted as (invalid) Liquid. This fixes such problems.
Additionally, Jekyll generates warnings about excerpts being part of a Liquid
block (the `{% raw %}`). This is fine, since doc pages don't use excerpts.
2020-12-14 10:35:30 +01:00
ISSOtm
8f2a894b88
Add anonymous labels
...
Fix #497
2020-12-14 10:14:40 +01:00
ISSOtm
5aabb915ec
Allow STRCAT to take any number of args
...
Fixes bullet point 1 of #625
2020-12-12 23:46:32 +01:00
ISSOtm
0d9de01f9d
Make charmap-converting a non-UTF8 string non-fatal
2020-12-12 14:16:50 +01:00
ISSOtm
f5b0eae9cd
Remove custom action code when equivalent to default
...
Enables Bison to better reason about it, and should improve performance
2020-12-12 12:22:36 +01:00
ISSOtm
417cceb0de
Document dw and dl with strings
2020-12-11 11:02:20 +01:00
ISSOtm
e54e02dc77
Correct underscore-in-number documentation
...
No radix actually allows underscores at the beginning of a literal
2020-12-10 16:01:18 +01:00
ISSOtm
2bf3b08d76
Document underscores in numeric literals
2020-12-10 15:40:59 +01:00
ISSOtm
21b58b08b8
Fix not shifting CRLF at end of raw lines
...
Fixes line reporting errors on Windows
2020-12-10 15:37:50 +01:00
ISSOtm
3e4c2fe712
Avoid error with old Bison versions
...
`api.token.raw` is only defined starting with Bison 3.5
Since it's not essential, define it on the command-line iff the Bison
version is sufficient.
2020-12-10 15:13:45 +01:00
ISSOtm
bdfce25db0
Avoid running version test when git describe fails
...
Can happen when not enough history has been fetched, notably in our CI
2020-12-10 13:43:22 +01:00
ISSOtm
2b6d9cd1e0
Avoid using yytoken_kind_t
...
Apparently it was added in a fairly recent Bison version...
2020-12-10 13:32:18 +01:00
ISSOtm
bf789dd7b3
Add automated test for version consistency
...
Automatically check that the version number constants
(__RGBDS_MAJOR__ etc.) match `rgbasm -V`
Should avoid the problem with 0.4.2's release...
2020-12-10 12:22:29 +01:00
ISSOtm
9b6f01047c
Enable raw token types
...
Removes one layer of indirection for the parser, and helps remove all literals from the grammar
The latter preparing the next change
2020-12-09 21:22:05 +01:00
ISSOtm
3fe2fa43bb
Switch to GNU Bison as a dependency
...
First step for #595
2020-12-09 20:30:31 +01:00
ISSOtm
ede982b50a
Bump patch level appropriately
...
*HEADDESK*
2020-12-09 20:30:31 +01:00
ISSOtm
319d775c13
Add CI script to create docs on new releases
2020-12-09 16:08:43 +01:00
ISSOtm
44124319a6
Work around old Bison versions not forward-declaring yyparse
...
Notably, macOS still ships 2.3 (from 2008)...
Should fix #214
2020-12-09 16:00:22 +01:00
ISSOtm
462fd7539c
Prohibit nested macros
...
After discussion (starting there:
https://github.com/gbdev/rgbds/pull/594#issuecomment-706437458
), it was decided that plain nested macros should not be
allowed.
Since #590 is fixed, EQUS can be used as a workaround;
multiline strings (#589 ) will make that easier on the
user when implemented.
Fixes #588 , supersedes and closes #594 .
Additionally, closes #388 .
2020-12-09 10:44:39 +01:00
ISSOtm
f16e34b804
Fix captures beginning in expansions
...
Fixes #590
2020-12-09 09:54:55 +01:00
ISSOtm
c3ccdc548e
Remove unnecessary flex dep from Dockerfile
2020-12-09 09:42:19 +01:00
ISSOtm
fd721ca480
Document optional RB/RW/RL argument
2020-12-09 09:39:46 +01:00
ISSOtm
eac365aef0
Allow argument to rb, rw and rl to be optional
...
Fixes #617
2020-12-09 09:31:47 +01:00
ISSOtm
4de6266442
Add explanation of how EXPORT works
...
Fixes #608
2020-12-08 21:07:24 +01:00
ISSOtm
213d985e17
Fix incorrect "sliced" INCBIN causing memory leaks
...
Oh, how I miss RAII...
2020-11-29 12:47:53 +01:00