Rangi42
8d268e8a8a
Initialize maxRecursionDepth with other options
2025-07-21 19:58:37 -04:00
Rangi42
ee0f311c10
Make nbErrors not extern
2025-07-21 19:49:08 -04:00
Rangi42
61730be6ce
Make failedOnMissingInclude not extern
2025-07-21 19:40:01 -04:00
Rangi42
5f333d9753
More refactoring around extern variables
2025-07-21 19:22:10 -04:00
Rangi42
d1493a9f96
Group extern RGBASM variables in an Options struct
2025-07-21 19:02:21 -04:00
Rangi
2935942667
Allow multiple preinclude files ( #1763 )
2025-07-19 17:07:15 -04:00
Rangi42
14f5e16ae8
Prefer pre-inc/dec unless post-inc/dec are necessary
2025-07-19 16:18:35 -04:00
Rangi42
e7d63f5f6b
Refactor code that handles when included files are missing
...
- Single unified routine for erroring out or handling missing dependencies
- Single three-state enum instead of two Booleans for missing dependencies
(this causes `-MC` to imply `-MG` instead of needing `-MG -MC`)
- Functions than can miss included files return a Boolean for whether the
parser should `YYACCEPT` and exit
2025-07-18 14:03:23 -04:00
Rangi42
d32b1912ed
Use verbosePrint in rgbasm as well as rgblink
2025-07-12 01:38:19 -04:00
Rangi
510a4aa99d
Add RGBASM -MC flag to continue -MG after missing dependency files ( #1687 )
2025-07-10 13:25:36 -04:00
Rangi42
276a200590
A few miscellaneous edits
2025-07-10 00:33:03 -04:00
Rangi
34cf959c9d
Refactor to reduce nesting depth some more ( #1740 )
2025-07-09 22:46:40 -04:00
Rangi
5e43ece578
Remove errx and errors.hpp ( #1737 )
2025-07-09 11:04:23 -04:00
Rangi
35962dedc4
Refactor warnings and errors ( #1728 )
...
* Remove `err` and `warn`, keep `errx` and `warnx`, using them in RGBGFX too
* Separate RGBGFX and RGBLINK warnings/errors from main options
* Separate `report` function into `error` and `fatal` messages
* Implicit newlines for most RGBASM errors
2025-07-08 12:58:23 -04:00
Rangi
c9765ec158
Factor out program-independent warning diagnostic code ( #1725 )
2025-07-07 18:34:34 -04:00
Rangi
d413870e6d
.sym file sorting accounts for local labels' parents' addresses and names ( #1684 )
2025-05-05 13:57:25 -04:00
Rangi
632342b254
Use LCOV_EXCL comments to exclude some lines from test coverage ( #1662 )
2025-02-16 13:56:55 -05:00
Rangi42
cae31005f8
Always use braces with InsertBraces: true in .clang-format
2025-01-27 20:12:12 -05:00
Rangi42
b8b60207f5
Use // line comments not /* block comments
2025-01-27 20:12:12 -05:00
Rangi
20c18256ed
Avoid errors after missing INCLUDE with -MG ( #1627 )
2025-01-25 12:38:17 -05:00
Rangi42
890528812e
Prefer C++ constructs to C-style sizeof-based macros
2025-01-24 18:56:41 -05:00
Rangi
d9654b752f
Support -h/--help for all programs ( #1620 )
2025-01-21 21:24:17 -05:00
Rangi42
a5f12f66bb
Define the default -recursion depth in main.cpp with other default values
2025-01-04 03:53:59 -05:00
Sylvie
b877c81c32
Use C++-style casts ( #1576 )
2024-12-09 21:56:54 -05:00
Rangi42
a27f704c25
Implement -Wunmatched-directive
2024-11-28 20:30:38 +01:00
Sylvie
3b3263273c
Make ENDL optional like ENDSECTION ( #1538 )
...
Add warning for `LOAD` without `ENDL`
2024-10-15 21:13:50 -04:00
Sylvie
cf85146353
Refactoring and enhancements to RGBASM warnings ( #1526 )
...
* Allow a `no-` prefix to negate "meta" warnings
(`-Wno-all`, `-Wno-extra`, `-Wno-everything`)
* Allow `-Wno-error=...` to override `-Werror`
(including for "meta" warnings)
2024-10-04 21:52:40 +02:00
Rangi42
26fcff831d
Run clang-format
2024-08-27 01:49:05 -04:00
Sylvie
0e8a17ce82
Report any section overflows at the end of assembly ( #1482 )
...
* Report any section overflows at the end of assembly
* Immediately handle overflow of the 32-bit size counter
2024-08-22 18:51:52 +02:00
Sylvie
f304e1dd7f
Implement state file output for RGBASM ( #1435 )
2024-08-05 12:41:40 -04:00
Sylvie
d4231f9efa
Remove redundant "unknown option" error messages ( #1441 )
...
`getopt` already prints "unrecognized option"
2024-08-05 16:04:53 +02:00
Rangi42
4e0f794c23
More refactoring and renaming
2024-07-26 20:12:51 -04:00
Sylvie
6a65cbc9ed
Some refactoring and reformatting ( #1431 )
2024-07-26 11:51:27 -04:00
Sylvie
ee748cfe26
Miscellaneous refactoring of code and docs ( #1411 )
2024-06-18 20:47:31 +02:00
Rangi42
eb708ebee5
Rename some variables left from the C parser (e.g. yylval)
2024-03-29 19:42:23 -04:00
Rangi42
b021090e7f
Remove deprecated -i for --include (use -I)
2024-03-28 17:26:42 -04:00
Rangi42
14b72222b1
Remove the deprecated -H/-h/-L/-l options
2024-03-28 17:26:42 -04:00
ISSOtm
cae7b5dcf6
Use standard attribute syntax instead of IBM __attribute__
...
Move format attrs to proper standard location
For some reason, GCC 13 is more lax than earlier versions...
2024-03-27 20:01:12 -04:00
Rangi42
dcb4e40388
Use QUOTEDSTRLEN macro instead of sizeof or strlen
2024-03-27 11:50:48 -04:00
Rangi42
912a1504ec
Defer closing of depend file
2024-03-27 11:44:26 -04:00
Rangi42
2ef5e807f8
No more memory leaks!
2024-03-27 11:27:34 -04:00
ISSOtm
9f239f6dcc
Use std::shared_ptr<std::string> for lexed/parsed strings
2024-03-22 14:25:36 -04:00
Rangi42
e96675be03
Pass std::string references to fstack functions
2024-03-18 14:42:05 -04:00
Rangi42
6cabb8c9af
Pass std::string references to output functions
2024-03-18 14:42:05 -04:00
Sylvie
820f6b5b3c
Consistently format type qualifiers like const on the right ( #1347 )
2024-03-10 12:21:52 -04:00
Sylvie
17444e825a
Reduce the header declarations ( #1342 )
...
- Since we have style rules to include foo.hpp at the top of its
corresponding foo.cpp, this takes any headers included by foo.hpp
as being also guaranteed for foo.cpp.
- Use C-style <foo.h> instead of <cfoo>, since the latter only
guarantees putting symbols in the `std` namespace, which we are
not using for C functions (e.g. `printf` not `std::printf`).
- Remove now-unused `__PRETTY_FUNCTION__` reporting
2024-03-09 14:55:39 -05:00
Sylvie
292adb27a3
Adapt the RGBASM parser to C++ ( #1333 )
...
This uses variants instead of a `%union`, and "complete symbols"
that can call complex constructors.
2024-03-06 20:40:36 -05:00
Rangi42
8c173b4e95
Remove declaration for compatibility with macOS bison 2.3
...
We've required bision 3.0 since October 2022
2024-03-06 17:58:15 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Rangi42
e14ba664ea
Remove redundant (void) parameter declarations
2024-03-01 10:41:47 -05:00