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
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
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
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
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
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
Rangi
dde9f2bb79
Rename some RPN constants for consistency ( #1230 )
2023-11-08 21:30:27 +01:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01: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
Rangi
f8af569680
Shorten license comments and consolidate an AUTHORS file ( #1217 )
2023-11-05 09:54:32 +01:00
Rangi
259ec58140
Implement ENDSECTION ( #1211 )
2023-11-04 23:41:17 +01:00
Rangi
46e67ee078
Remove deprecated RGBASM features ( #1215 )
...
- Escaped commas "\," inside strings
- `name: MACRO` syntax
- `__FILE__` and `__LINE__`
- `-H/--nop-after-halt` and `-l/--auto-ldh` on by default
2023-11-04 23:22:46 +01:00
Rangi
c869edd1d2
Implement SIZEOF and STARTOF for section types ( #1205 )
2023-11-03 08:50:04 +01:00
Rangi
181512ad9d
Implement INCHARMAP function ( #1184 )
2023-11-02 20:14:54 +01:00
Quinn
944c5f0cd0
Implement order-independent purge ( #1173 )
...
Each symbol passed to purge is collected in a list before mass removal.
Fixes the issue described in gbdev/rgbds issue #1152 .
---------
Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com >
2023-10-25 22:34:56 +02:00
Rangi
3c049983f1
Fixed-point functions can take specific precision ( #1086 )
2022-10-02 16:56:08 +02:00
Rangi
08545643cf
Only define @ and _NARG when they have values ( #1073 )
...
Fixes #1069
Co-authored-by: Eldred Habert <eldredhabert0@gmail.com >
2022-10-01 01:04:03 +02:00
Rangi
c35cb6ac32
Warning levels -Wunmapped-char=0/1/2 ( #1061 )
...
Fixes #1058
2022-09-29 18:14:04 -04:00
Rangi
b8385a50e3
Support -P/--preinclude to pre-INCLUDE a file ( #1043 )
...
Fixes #1041
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2022-09-24 12:37:16 -04:00
Rangi
98a6dffbca
Implement opt Q for fixed-point precision, and q literals (e.g. 12.34q8) ( #958 )
...
Fixes #957
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2022-09-05 00:47:32 +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
7a2ee26792
rgbasm -r sets the maximum recursion depth (#1026 )
...
Previously it set the minimum failure depth (off by one)
Fixes #978
2022-08-28 15:21:29 -04:00
Rangi
425339ccf6
Implement FMOD function for fixed-point modulo
...
Fixes #1021
2022-08-28 21:21:10 +02:00
Rangi
8207dc57b7
Add a -Wunmapped-char warning for characters not in the charmap ( #1023 )
...
Fixes #1022
2022-08-28 15:12:43 -04:00
ISSOtm
97c326942f
Warn about automatic instruction alterations
...
Step 1 of #986
2022-05-21 21:49:07 +02:00
ISSOtm
b037d54f64
Remove deprecated symbols
...
Fixes #896
2022-05-21 21:45:06 +02:00
ISSOtm
7dd8ba37f1
Allow changing recursion depth limit at runtime
2022-02-05 20:32:56 +01:00
Eldred Habert
6842c831fd
Allow binary AND to be sometimes constant ( #976 )
2022-02-05 14:17:57 -05:00
ISSOtm
bbae9966e9
Fix string constness issues in RGBASM
2022-02-05 20:11:25 +01:00
ISSOtm
9b49f788e4
Add missing header in opt.h
2022-02-05 13:37:40 +01:00
Rangi
b9fd85470e
Reword docs now that SET is deprecated ( #946 )
...
- '=' constants are "variables" (not "mutable constants")
- EQU constants are "numeric constants" (not "immutable constants")
- EQUS constants are "string constants" (not "string equates")
- DS declarations are "static allocations" (not "variables")
2021-11-22 17:08:29 -05:00
ISSOtm
54293a9184
Remove unused "MAX_PATH" header
...
The header's name was also quite misleading.
Also remove an unused define in `asm/symbol.h`.
2021-11-21 18:32:29 +01:00
ISSOtm
b04e71ed34
Use correct length type for Abs*Group
2021-11-21 18:28:42 +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
0bb815edc0
Implement -Wnumeric-string[=0|1|2] ( #935 )
...
Fixes #934
2021-11-12 23:09:35 +01:00
Rangi
11a6a81169
Implement -Wtruncation=level ( #931 )
...
* Implement -Wtruncation=level
-Wtruncation=0 is the same as the current -Wno-truncation.
-Wtruncation=2 is the same as the current -Wtruncation.
-Wtruncation=1 is the new default; it's less strict, allowing
N-bit values to be between -2**N and 2**N (exclusive).
* Implement generic "parametrized warning" system
* Test more `Wtruncation` variants
Co-authored-by: ISSOtm <eldredhabert0@gmail.com >
2021-10-31 17:47:31 -04:00
Rangi
a67f5d6e01
SIZEOF("Section") and STARTOF("Section") can be known
...
Fixes #890
2021-06-27 21:03:06 +02:00
Rangi
6d2db2ef64
make checkdiff does CI documentation checks (#900 )
...
Fixes #744
2021-06-24 17:49:08 -04:00
ISSOtm
8bbafb7200
Rename out_ functions in section.c to sect_
...
More consistent with convention used everywhere, and makes it easier to
know which file the functions come from.
2021-05-03 12:22:14 +02:00