Rangi42
95e7dac9a6
Use std::map for rgbasm charmaps
2024-02-29 13:44:08 -05:00
Rangi42
83d3a39dcd
Use std::map for rgbasm symbols
2024-02-29 13:44:08 -05:00
Rangi42
f44701c02d
Use std::map for rgblink symbols and sections
2024-02-29 13:44:08 -05:00
Rangi42
d5de3fa111
Use std::deque for symbol lists
...
Also fix a memory leak that this reveals
2024-02-29 13:44:08 -05:00
Rangi42
bc8cb754c0
Use std::deque for sections
2024-02-29 13:44:08 -05:00
Rangi42
2ea6de7195
Use std::stack for unions
2024-02-29 13:44:08 -05:00
Rangi42
8083ef605f
Use std::deque for section patches
2024-02-29 13:44:08 -05:00
Rangi42
b87ee62e6c
Use std::deque for assertions
2024-02-29 13:44:08 -05:00
Rangi42
521ca1c34a
Use std::vector for symbols
2024-02-29 13:44:08 -05:00
Rangi42
a310b659cd
Use std::deque (iterable) for section stack
2024-02-29 13:44:08 -05:00
Rangi42
feb342804b
Use std::stack for IF stack
2024-02-29 13:44:08 -05:00
Rangi42
36cfce40ad
Use std::stack for options
2024-02-29 13:44:08 -05:00
Rangi42
52c80c2740
Use std::stack for charmaps
2024-02-29 13:44:08 -05:00
Rangi42
3da201b26e
Give explicit test output if the scramble-romx size is wrong
2024-02-26 18:26:17 -05:00
Rangi42
d87b1ed22a
Refactor some redundant error/warning-printing code
2024-02-24 19:05:29 -05:00
Rangi42
c70cecc24a
Add missing license header
2024-02-21 19:20:10 -05:00
Rangi42
bba5b8a740
Remove unused struct definition
2024-02-21 16:42:14 -05:00
Rangi42
c0da9fa2bb
Remove obsolete #undef fail
2024-02-20 20:15:34 -05:00
Rangi42
ee59f17ea1
Free all the charmaps after parsing
2024-02-19 09:00:15 -05:00
Rangi42
464000bca8
Clarify TODO comment
2024-02-19 08:49:12 -05:00
Rangi42
bc8fd8a6dc
Separate union members for EQUS and MACROs
2024-02-19 08:49:04 -05:00
Rangi42
f00e57a0ed
Log indiviual rgblink test variants
2024-02-18 19:37:19 -05:00
Rangi42
cd297e1f90
Remove unused rgblink function sym_ForEach
2024-02-18 18:46:07 -05:00
Rangi42
5e8c87cf82
.dockerignore is too trivial to license :P
2024-02-18 18:45:49 -05:00
Rangi42
3860ab11c7
Reformat some deeply-indented lines
2024-02-18 18:14:13 -05:00
Rangi42
580b7ec5be
Avoid links that just say "here"
2024-02-18 15:06:55 -05:00
Rangi42
bd56405aae
Remove now-unnecessary indentation of code blocks
2024-02-18 15:02:17 -05:00
Rangi42
2dee0fc536
Refer to https URLs when applicable
2024-02-18 14:58:46 -05:00
Rangi42
26f150220b
Update some contributors
2024-02-18 20:44:23 +01:00
Rangi42
289910fe83
Convert reStructuredText to Markdown
2024-02-18 20:44:23 +01:00
Rangi42
f1b6ef204d
Fix some reStructuredText
2024-02-18 14:09:37 -05:00
Rangi42
a5ceaa3664
Use semicolons, not comma splices
2024-02-17 09:43:22 -05:00
Rangi42
3741510108
Use rgbasm -I, not -i
2024-01-29 16:41:06 -05:00
Rangi42
eaed9eee5b
Gameboy -> Game Boy
2024-01-03 11:28:02 -05:00
Rangi42
7b199d7550
Fix documentation for ATAN2's (y, x) argument order
2023-12-24 03:59:01 -05:00
Rangi42
09dbc50447
Some refactoring
2023-12-18 15:51:13 -05:00
Rangi42
b46aa0f55b
colour->color, behaviour->behavior
...
These spellings are more common elsewhere in the codebase
2023-11-27 16:02:17 -05:00
Rangi42
482160ea04
Prefer rpn_isKnown(expr) accessor to expr->isKnown directly
2023-11-21 10:46:59 -05:00
Rangi42
ad62421264
Use rpn_isKnown wrapper outside rpn.cpp
2023-11-21 10:33:35 -05:00
Rangi42
7a1e052b58
Factor out one shared enum FileStackNodeType
2023-11-07 08:27:03 +01:00
Rangi42
02f9128d07
Make some changes noticed while porting to C++
2023-11-07 08:27:03 +01:00
Rangi42
a64f28de5c
Avoid using %# printf specifier
2023-11-02 17:38:10 +01:00
Rangi42
b4dbb5093a
Warn when SGB compatibility is set without old licensee 0x33
2023-11-02 17:38:10 +01:00
Rangi42
ab42eb2c50
Document STRUPR/STRLWR as ASCII-only
2023-10-31 14:28:38 -04:00
Rangi42
45c2a5e4ec
Consistently use uppercase hex digits
2023-10-31 14:28:38 -04:00
Rangi
4cadc6f0fe
\en not \n is a newline in troff
2023-03-04 18:36:22 -05:00
Rangi
01f1703dfb
Preserve \@ through INCLUDE
...
Fixes #1112
2022-12-11 18:56:03 +01:00
Rangi
69a573923f
Version 0.6.1
2022-12-02 22:48:37 -05:00
Rangi
79748afdc4
Align the "; Next union/fragment" comments with their symbols
2022-11-06 23:55:15 +01:00
Rangi
32cb0558e4
Print "; Next union/fragment" between "pieces" in .map file
...
Resolves #1099
2022-11-06 23:55:15 +01:00
Rangi
f90857032c
Version 0.6.0
2022-10-02 19:08:13 -04:00
Rangi
1653a9a3f2
Use -flto=auto
2022-10-02 13:50:35 -04:00
Rangi
bbe28faab4
Sort rgbgfx's -r option alphabetically
2022-10-01 21:22:39 -04:00
Rangi
a1107fc5cf
Refactor !!x to x != 0
...
Also limit comments and docs to single "!"s
2022-10-01 14:09:02 -04:00
Rangi
140c6b169e
Patch pokecrystal to use embedded palettes
2022-10-01 00:51:14 +02:00
Rangi
d86d24bdc1
Remove legacy support for generating a palette with unused colors
...
If you need an explicit set of colors, possibly including
unused ones, use `-c`.
Fixes #1062
2022-10-01 00:51:14 +02:00
Rangi
f5b1990604
Document that symbol interpolation works outside of strings too
2022-09-22 01:15:17 -04:00
Rangi
6df75f7af3
Summarize used and free space at the end of the .map file
...
Fixes #1046
2022-09-12 23:16:09 +02:00
Rangi
7ae23e6cdb
Release 0.6.0-rc2
2022-09-08 17:07:47 -04:00
Rangi
889302a9e2
Document the -H and -l flags
...
Fixes #1042
2022-09-02 08:43:41 +02:00
Rangi
a52a00a9ca
macro_UndefUniqueID uses 0 to mean \@ is undefined
2022-08-30 16:50:34 -04:00
Rangi
fa13611bbf
Make comments more consistent
...
- Changes most `/* comments */` to `// comments`
- Changes `/**` block comments consistently to `/*`
- Adds consistent license comments to all files
Also renames `T_POP_SET` to `T_Z80_SET`
2022-08-30 07:51:32 +02:00
Rangi
dca24a6d50
Test that OPT r fails immediately if the recursion depth is already exceeded
...
Fixes #1034
2022-08-28 22:21:24 +02:00
Rangi
425339ccf6
Implement FMOD function for fixed-point modulo
...
Fixes #1021
2022-08-28 21:21:10 +02:00
Rangi
d29057e747
Indent "SLACK:" to match the "SECTION" headers
2022-08-28 20:35:21 +02:00
Rangi
f1b74fa610
Report empty space between sections in map file
2022-08-28 20:35:21 +02:00
Rangi
c7a92d3104
rgblink -M omits symbol names from .map file
2022-08-28 20:35:21 +02:00
Rangi
4ed5ba7508
Finish using time_utc before initializing time_local
...
gmtime and localtime may share the same static internal struct tm,
so they cannot both be initialized and then used.
2022-01-27 22:32:34 -05:00
Rangi
20a26599a3
Simplify allocating multiple ds args
...
Dealing with indexes is only necessary for `strfmt`
2021-12-01 20:24:31 -05:00
Rangi
7bdfc9da23
Really don't use new as a variable name
2021-11-30 17:06:36 -05:00
Rangi
d073cffa74
Don't use new as a variable name
...
It conflicts with the C++ keyword
2021-11-24 22:48:28 -05:00
Rangi
8435a29c4e
Turn the readChars macro into a readInternal function
...
This macro was only used twice, and the second usage did
some unnecessary work.
2021-11-25 00:26:23 +01:00
Rangi
9d993d84e8
Release 0.5.2
2021-11-23 17:08:03 -05:00
Rangi
db79689e81
Add -Wnumeric-string to shell autocompletion
2021-11-22 17:58:12 -05:00
Rangi
c2ca46c27d
Remove TRACE_PARSER support
...
Attempting to build with this gave an "undefined reference to `yydebug'"
error (maybe a version issue with bison?), and I don't think it's been
used for recent parser debugging either.
2021-11-22 23:49:59 +01:00
Rangi
aac839f389
Remove dbgPrint and TRACE_LEXER support
...
I have not found `TRACE_LEXER` to be useful in debugging
actual lexer issues.
2021-11-22 23:49:59 +01:00
Rangi
9d9febe1d3
Consistent title case for rgbasm.5 headings
2021-11-22 17:12:16 -05:00
Rangi
f82603f196
Lowercase "error:" in -Werror output
2021-11-20 11:21:46 +01:00
Rangi
cedfd2582a
Move more statements into for loop clauses
2021-11-19 22:55:20 -05:00
Rangi
c7322258fc
Refactor readGfxConstant for consistency, and edit warning message
2021-11-19 21:36:56 -05:00
Rangi
036b6c1b89
Capitalize "FATAL:" in rgblink error messages
...
"warning:" and "error:" are lowercase
This matches rgbasm's formatting
2021-11-19 19:52:57 -05:00
Rangi
8e2a164a32
Implement compound assignment operators for mutable constants
...
Fixes #943
2021-11-19 08:50:00 +01:00
Rangi
b76819792d
Deprecate SET in favor of =
...
`SET` is redundant with `=`, and is already the name of an instruction.
2021-11-19 00:05:49 +01:00
Rangi
3e945679ad
Standardize on "east const" (type const * not const type *)
...
Avoid "WARNING: Move const after static - use 'static const char'"
2021-11-18 09:12:00 +01:00
Rangi
efccf6c931
A few stylistic tweaks
...
- `goto free_romx` -> the more typical `goto cleanup`
- `goto fail` -> the more typical `goto finish`
- Remove a redundant `todo` variable
2021-11-17 23:51:40 -05:00
Rangi
e5552e27f2
strrstr can take and return char const *
2021-11-17 22:47:05 -05:00
Rangi
b002d95459
Fix precison of fixed-point formatting
...
Fixes #908
2021-10-28 23:29:16 +02:00
Rangi
4a73eb56ea
Make peek() tail recursive instead of using goto
...
Compilation is identical with `gcc` or `clang`, -O3` or `-O2`
2021-08-18 01:30:47 +02:00
Rangi
b51e1c7c2c
Compare FOR ranges to Python's range
2021-08-01 10:45:44 +02:00
Rangi
26ddf1ff4d
Prevent defining invalid local labels
...
Fixes #913
2021-07-30 15:21:47 +02:00
Rangi
03bb510588
endCapture shouldn't handle lexerState->atLineStart
...
`startCapture` did not initialize `lexerState->atLineStart`;
its final value is a consequence of the separate but similar
behaviors within `lexer_CaptureRept` and `lexer_CaptureMacroBody`.
2021-07-04 18:31:46 -04:00
Rangi
695dfe9dbd
Add missing file line-continuation-string.asm
...
Also make some minor formatting corrections
2021-07-04 16:12:34 -04:00
Rangi
1b5648bb06
Line continuations *do* work inside strings
...
The rgbasm.5(5) documentation was outdated here
2021-07-01 17:56:49 -04:00
Rangi
a67f5d6e01
SIZEOF("Section") and STARTOF("Section") can be known
...
Fixes #890
2021-06-27 21:03:06 +02:00
Rangi
06b57aa1ce
Avoid unnecessary "overwriting a non-zero byte" warnings
...
- Don't warn if the non-zero byte being written is the same as the original byte
- Add a `-O` / `--overwrite` flag to silence all such warnings
Fixes #897
2021-06-27 19:16:11 +02:00
Rangi
80a376f045
Syntax errors resets the lexer right away
...
`DEF`, `REDEF`, etc disable EQUS expansion, and reading
macro or OPT arguments sets the lexer to raw mode.
Syntax errors resume normal parsing at the line's end,
but should resume normal tokenization even before that.
2021-05-22 16:08:55 -04:00
Rangi
0068c1375c
Syntax error message hints to indent macro invocations
...
This message is only printed for identifiers parsed as
`T_LABEL` (since they're at the start of a line) but
already defined as macros. Otherwise it may not be
relevant, e.g. for `MyLabel;:` or `My Label::`.
2021-05-22 14:58:26 +02:00
Rangi
23721694ea
Comment that anonymous labels internally start with '!'
...
`startsIdentifier` should not accept this character so
anonymous labels won't conflict with nonymous ones.
2021-05-15 12:57:22 -04:00
Rangi
6a5e2f439e
Fix the STRFMT documentation in rgbasm(5)
...
Fixes #886
2021-05-09 17:23:57 -04:00
Rangi
fba77c4dce
Specify to update the release branch in RELEASE.rst
...
This is done manually after publishing a release.
2021-05-08 23:44:53 -04:00