Rangi42
9fd0c0297f
Fix invalid character in bracketed macro argument
...
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42
c1c7e64249
Add two assume calls to verify lexer arguments
2026-04-27 15:35:10 +02:00
Rangi42
a18b2f1049
Consistently lex local labels after keywords, even when skipping/capturing
2026-04-27 15:28:30 +02:00
Rangi42
eeb3a73210
Small optimization to skipToLeadingKeyword
2026-04-27 14:26:47 +02:00
ISSOtm
d5ce5329ea
Fix compilation with GCC 9
2026-04-26 23:30:59 +02:00
ISSOtm
6bcd79b997
Revert "Derive operator!= from operator== ( #1660 )"
...
This reverts commit 993879a2ed .
2026-04-26 23:30:59 +02:00
Rangi42
0553491107
Replace a FIXME comment with an explanation of why we can't/won't "fix" it
2026-04-20 14:51:38 +02:00
Rangi
cfec017fed
Consolidate, refactor, and bugfix the lexer's handling of captures and skips ( #1957 )
...
- Do not error about local labels following keywords in skips or captures (fixes #1955 )
- Do not incompletely attempt to handle line continuations in skips (fixes #1956 )
- Rename `skipToLeadingIdentifier` to `skipToLeadingKeyword`, refactor to merge
`skipToEOL` into it, and use it for both skips and captures
2026-04-20 13:04:20 +02:00
Rangi42
12186fdccc
Keep more non-declaration initialization within the for loop clause
2026-04-19 22:01:56 +02:00
Rangi
71dfab3365
Use charmapEntry to simplify charmap_HasChar
2026-04-17 15:39:30 -04:00
Rangi
20b11039c9
Keep trie edges sorted for O(log N) lookup
2026-04-17 15:39:30 -04:00
Rangi
eb9e9c0f33
Replace charmaps' fixed-size 256-value array with a vector of pairs
...
This should save memory at the cost of O(n) instead of O(1) access,
which should be okay because the `next` vector is generally small.
2026-04-17 15:39:30 -04:00
ISSOtm
81edc27b6e
Fix two warnings on MinGW
2026-04-16 00:57:33 +02:00
ISSOtm
6b994b1737
Fix some warnings raised by MSVC
2026-04-16 00:57:33 +02:00
Rangi
df0b557638
Don't allow invalid interpolations to occur ( #1925 )
...
Fixes #1921
2026-04-11 18:16:07 +02:00
Eldred Habert
422e8eec20
Generate Bison output in CMake build tree ( #1929 )
...
Again, moving away from in-tree builds
2026-04-10 18:46:57 -04:00
Rangi
49a4da2235
Revert "Generate Bison output in CMake build tree"
...
This reverts commit 4577ff16bc .
2026-04-10 17:18:40 -04:00
ISSOtm
4577ff16bc
Generate Bison output in CMake build tree
...
Again, moving away from in-tree builds
2026-04-10 22:56:59 +02:00
ISSOtm
b430d5a8b8
Note why we are not using a CMake list to pass Bison flags
2026-04-10 22:33:54 +02:00
ISSOtm
a5be1d886e
Copy DLLs to appropriate dir for install-less Windows testing
...
Co-authored-by: vulcandth <6394873+vulcandth@users.noreply.github.com >
2026-04-10 18:01:16 +02:00
vulcandth
c3b47abcc8
Use CPack for Windows packaging
2026-04-10 18:01:16 +02:00
Rangi
6e13779b8b
Use C++-sryle static_cast, not C-style explicit cast
...
`uint32_t(param)` is actually functional notation of explicit casting,
not a direct constructor call. `uint32_t{param}` would be uniform
initialization syntax for a constructor call, but would not allow
narrowing from `uint64_t`. See issue #1904 for discussion.
2026-04-08 20:05:36 -04:00
Rangi
9b4b4a581b
Check for overflow in fixed-point precision suffix ( #1918 )
...
Fixes #1917
2026-04-07 17:06:54 -04:00
Rangi
11f6278d95
Refactor lexing of fixed-point numbers ( #1915 )
...
This incidentally fixes a bug with too-long fixed-point literals
that have precision suffixes.
2026-04-06 21:45:34 -04:00
Rangi
ede9405daf
Fix some fixed-point literal lexing issues ( #1914 )
...
- No fractional digits are necessary after the decimal point,
e.g. `42.` is valid instead of `42.0`
- Error messages refer to "fixed-point" not "integer" constants
- Test more carefully for lexing unrelated to underscores
2026-04-04 13:41:45 -04:00
Rangi
25bf0e9e2c
SOURCE_DATE_EPOCH must be in base 10
2026-03-30 21:31:37 -04:00
Rangi
18b074711e
Fix rgbasm -s not overriding a previous -s
2026-03-30 20:18:19 -04:00
Rangi
efd4373a56
Check for a SDAS "Def" or "Ref" line before reading a subsequent integer
...
Without checking `token[0]` through `token[2], `readInt` starting at
`&token[3]` could go out of bounds on a badly-formed SDAS .rel object file
2026-03-30 19:45:44 -04:00
Rangi
66e521e9e5
Factor out common error-handling functions for lexing numbers of different bases ( #1888 )
2026-03-19 15:32:25 -04:00
ISSOtm
d6d1844d60
Seek lib deps via CMake FetchContent
...
`FetchContent` respects existing installs, and downloads and compiles the libs
if they aren't found.
This is admittedly a little finicky, since this ignores the usual `Find*`
modules provided by CMake, requiring a bit of glue on our side.
But, one upside is that this moves that logic from our CI into the build system,
which can thus benefit other downstream users.
This also opens the door to some improvements in upcoming commits.
Doing this with Bison turned out to be much more painful, however, due to
`FindBISON` providing the specific `bison_target` command; thus, it remains
installed externally, so that it can be picked up by `FindBISON`.
This also bumps our CMake version requirement slightly, though it's
possible that older versions keep working, or could be supported with small patches;
however, our CI doesn't provide anything below 3.31, so we can't check.
2026-03-19 20:30:12 +01:00
ISSOtm
091452d591
Remove call to configuring version file
...
Missed in 5c4ca36c5a
2026-03-17 05:28:23 +01:00
ISSOtm
df1d909853
Improve documentation of CMake bin output dir
2026-03-17 05:27:39 +01:00
ISSOtm
5c4ca36c5a
Harmonise passing build version
...
Avoid running some configure step, instead pass it as a define like the Makefile
2026-03-16 20:23:47 -04:00
ISSOtm
d8722b6705
Use imported targets for linking to libpng
...
This massively simplifies the process lol
2026-03-16 20:23:47 -04:00
ISSOtm
63c7835e71
Stop overriding the binaries' install dir
...
This is equivalent to the default, except the default accepts being overridden
2026-03-16 20:23:47 -04:00
ISSOtm
bc37b0ece6
Skip trying to link to libm explicitly
...
This doesn't seem to be necessary: it is automatically linked to,
at least on my machine. \*shrugs\*
2026-03-16 20:23:47 -04:00
ISSOtm
a139cbc744
Refactor the source file listing
...
Make the common files into an object library, which lets them
be compiled only once (saving 41 build steps)
This also lends itself well to removing the per-program loop,
which simplifies the code somewhat.
2026-03-16 20:23:47 -04:00
ISSOtm
d054f07703
Fix some truncation warnings
...
Amusingly, reported by MSVC only
2026-03-10 01:31:23 -04:00
Rangi
48d58ba095
Pass -Wdangling-alias to Bison 3.5 or newer
...
`bison -Wall` enables all diagnostics except `-Wcounterexamples`
(added in 3.7; we already pass it), `-Wyacc` (which we do not need),
and `-Wdangling-alias` (added in 3.5).
2026-03-06 22:28:09 -05:00
Eldred Habert
7c1e1fe515
Reference the file that actually provides the linker script lexer
2026-01-27 12:54:06 +01:00
Rangi
d053025070
Avoid writing "XXX" since it's a conventional "TODO/FIXME" comment
2026-01-22 13:01:10 -05:00
Rangi
e738b90c69
Refactor to combine similar functions into one
2026-01-07 16:36:04 -05:00
Rangi
a91d26192d
Fix SECTION UNION alignment depending on piece order
2026-01-07 16:36:04 -05:00
Rangi
41fe1d8f25
Correct error message for unconstrained sections with overlay ( #1879 )
2025-12-28 19:21:53 -05:00
Rangi
a9ab248fed
Improve some RGBGFX error messages ( #1876 )
...
* Improve some RGBGFX error messages
* Fix assertion failure on ambiguous transparent/opaque pixels
2025-12-19 13:00:05 -05:00
Rangi
2666dcbc26
Remove exclamation marks and periods from error messages ( #1874 )
2025-12-10 11:50:33 -05:00
Rangi
b0e0dfc56e
Handle a missing -P/--preinclude file the same as an INCLUDE ( #1873 )
2025-12-08 14:39:34 -05:00
Rangi
33475e2c36
Factor out version-printing to usage.cpp ( #1870 )
2025-12-05 23:04:49 -05:00
Rangi
c8161be23a
Add missing SPDX-License-Identifier: MIT comments
2025-12-05 22:41:12 -05:00
Rangi
2c5c453ab8
Refactor FileStackNode::printBacktrace from recursive to iterative
...
This avoids a potential stack overflow for very long backtraces,
or for corrupt object files with cyclic backtraces
2025-12-05 22:41:12 -05:00