Rangi42
72e9f55368
Use automatic allocation for patches
2024-02-29 13:44:08 -05:00
Rangi42
9140180c85
Use automatic allocation for sections
2024-02-29 13:44:08 -05:00
Rangi42
e022adf4a0
Use automatic allocation for assertions
2024-02-29 13:44:08 -05:00
Rangi42
6e03504802
Use std::deque for expansions
2024-02-29 13:44:08 -05:00
Rangi42
1afc8554c0
Use std::deque for file stack nodes
2024-02-29 13:44:08 -05:00
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
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
Sylvie
b66212e6d6
Fix fstack traces for macro nodes ( #1318 )
...
Since the lexer rewrite, MACRO nodes' fstack traces have not
included their parent REPT nodes' names.
2024-02-24 20:23:25 -05:00
Rangi42
d87b1ed22a
Refactor some redundant error/warning-printing code
2024-02-24 19:05:29 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
54d6a22d19
Build with pedantically standard C++ ( #1309 )
...
* Remove array designators (not standard C++)
* Build with pedantically standard C++
2024-02-23 16:46:53 -05:00
Sylvie
c0d534f5ad
No more flexible array members (not standard C++) ( #1307 )
...
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s
* Anonymous types declared in an anonymous union are also non-standard
Only Clang complains about this (-Wnested-anon-types)
2024-02-22 16:22:37 -05:00
Sylvie
6d29d2a67e
Simplify fstk_FindFile usage ( #1310 )
...
* Simplify `fstk_FindFile` usage
* Use `std::string` for `fstk_FindFile`
2024-02-22 13:14:38 +01:00
Rangi42
ee59f17ea1
Free all the charmaps after parsing
2024-02-19 09:00:15 -05:00
Rangi42
bc8fd8a6dc
Separate union members for EQUS and MACROs
2024-02-19 08:49:04 -05:00
Sylvie
9cdd0b8a02
No more anonymous structs (not standard C++) ( #1305 )
...
This is one step to restoring `-pedantic` builds
2024-02-19 08:12:20 +01:00
Sylvie
a02687a83e
Fix behavior of non-ASCII bytes with INCHARMAP ( #1308 )
2024-02-19 08:09:55 +01:00
Rangi42
3860ab11c7
Reformat some deeply-indented lines
2024-02-18 18:14:13 -05:00
ISSOtm
1b08a12b26
Ensure that mid-section align 16 makes PC constant
...
This makes `align 16` a sort of `org`, which is *very* useful :)
2024-02-18 17:53:56 -05:00
ISSOtm
36dad4380e
Honor alignment offset for ALIGN[16, N]
...
The *one* place where it was missed...
2024-02-18 17:53:56 -05:00
Sylvie
8a49a0b714
Report "<stdin>" or "<stdout>" when using "-" as a filename placeholder ( #1297 )
...
Also fix a memory leak with `targetFileNames`
2024-02-18 17:07:25 +01:00
Sylvie
c07f3da9a1
Provide guidance to remove the deprecated rgbasm flags ( #1296 )
...
* Explain to remove the deprecated rgbasm flags
* Rephrase deprecation warnings
2024-02-18 16:16:15 +01:00
Sylvie
d71a161bc9
Phrase error messages as "Failed to", not "Could not" or "Couldn't" ( #1298 )
2024-02-18 14:52:31 +01:00
Sylvie
ef0d973187
Truncate long format spec strings before using them ( #1299 )
...
Fixes #1293
2024-02-18 14:27:03 +01:00
Sylvie
66fd5a7062
Fix some usually disabled compiler warnings ( #1286 )
...
* Fixes from temporarily re-enabling more compiler warnings
* More edits suggested by cppcheck
* Fix hanging on append_yylval_string
* Fix FOR loop increment
2024-01-18 20:47:20 +01:00
Eldred Habert
fd78a9ae83
Port linkerscript parser to Bison ( #1266 )
...
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead
---------
Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com >
2023-12-11 02:29:37 +01:00
Rangi
34b2543c8b
Implement -X/--max-errors for RGBASM ( #1262 )
...
Co-authored-by: Eldred Habert <me@eldred.fr >
2023-12-07 11:42:47 +01:00
Rangi
6132b77c1e
Add more tests for RGBASM code coverage ( #1257 )
...
* Add more tests for RGBASM code coverage
* Use C++ unnamed parameters, not `(void)` casting
* Fix crash in `sect_AlignPC` from #1253
2023-12-01 10:21:43 -05:00
Rangi
cee3d1c859
Add more test coverage for RGBASM ( #1256 )
...
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
2023-11-29 15:16:05 -05:00
Rangi
2ebd7f2ea3
Allow negative alignment offsets ( #1255 )
2023-11-25 09:40:20 +01:00
Rangi
756f2866bb
Refactor alignment spec parsing ( #1253 )
2023-11-25 00:06:05 +01:00
Rangi
46e29de66f
Implement ds align[alignment, offset] ( #1181 )
2023-11-21 23:57:47 +01: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
Rangi
3c0879a3c6
Fix spurious truncation warning ( #1238 )
2023-11-20 22:51:51 +01:00
Rangi
e824e34526
Use an iterator template for enum sequence loops ( #1228 )
2023-11-12 09:19:19 +01:00
Rangi
dde9f2bb79
Rename some RPN constants for consistency ( #1230 )
2023-11-08 21:30:27 +01:00
Rangi
8eeb40cca8
Implement #"raw strings" ( #1122 )
...
Fixes #1121
2023-11-07 23:48:23 +01:00
Rangi
9fc088dcb0
Fix the FOR loop count formula ( #1222 )
2023-11-07 23:43:46 +01:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00
Rangi42
02f9128d07
Make some changes noticed while porting to C++
2023-11-07 08:27:03 +01:00