Rangi
ee20d9010e
Make @ relative to the start of a ds even at link time
...
Fix #737
2021-02-16 22:47:07 +01:00
Rangi
2bc12447e2
Update rgbds(5) object file format documentation ( #740 )
2021-02-16 16:36:37 -05:00
Rangi
cb61da8842
-Wmacro-shift warns about shifting macro arguments too far ( #741 )
...
Fixes #735
2021-02-16 16:31:01 -05:00
ISSOtm
122ba6eba5
Update deprecated feature examples
...
Those have been removed, lol
2021-02-16 22:09:31 +01:00
Rangi
dddff0f450
Cannot start a new section that's already on the stack
...
This is only relevant for FRAGMENT or UNION sections, since
normal ones would fail with "Section already defined previously".
Fixes #730
2021-02-16 21:51:48 +01:00
Antonio Vivace
a919f922a1
Add FUNDING.yml to show the Sponsor button on the repository
2021-02-16 21:23:27 +01:00
Rangi
8f20620c16
Allow shifting macro arguments by a negative amount
...
Fixes #733
2021-02-14 16:21:00 +01:00
Rangi
96bce05be2
Newlines in multi-line strings update the line number
...
This affects error and warning messages, and dbgPrint
2021-02-14 16:16:52 +01:00
Rangi
fc2bf3d11d
Prefer sizeof($$) to MAXSTRLEN + 1
...
This makes `strsubUTF8` similar to `strrpl` and `strfmt`
2021-02-14 16:16:52 +01:00
Rangi
8415ce3ed0
Correct the keywordDict size
...
The stale keywords XDEF and GLOBAL were removed,
so there can be fewer keyword nodes.
2021-02-14 16:16:52 +01:00
Rangi
ebb5aab6db
Correct some comments
...
nPCOffset no longer exists, and the lexer only
returns T_NEWLINE for EOF in raw mode.
2021-02-14 16:16:52 +01:00
Rangi
464a3a4892
Separate extern getopt implementation from the unistd.h one
...
Fixes #710
2021-02-12 00:29:21 +01:00
ISSOtm
88e1cc7302
Make EOF token name consistent across Bison versions
...
The "end of file" name apparently only became a default recently
2021-02-11 13:04:43 +01:00
ISSOtm
b3c0db218d
Remove "EOF-newline" lexer hack
...
In preparation for an upcoming change
Makes for nicer error messages, complaining about EOF instead of newlines
The hack had to be kept for the lexer raw mode to avoid a bug;
see the relevant code comment for more info.
2021-02-11 12:48:37 +01:00
ISSOtm
76446e6d00
Change behavior of merging FRAGMENTs to constrain each fragment individually
...
Additionally, remove the deprecated merging of non-fragment SECTIONs
2021-02-10 10:19:16 +01:00
ISSOtm
6623b1dc45
Fix CI on macOS
...
Apple supplies version 2.3 (from 2006!!), which doesn't support `%empty`.
2021-01-23 13:45:12 +01:00
ISSOtm
70bbb098d3
Remove stale keywords
...
They were removed from the grammar, but not the lexer
2021-01-23 00:05:56 +01:00
ISSOtm
1926065377
Enable Bison warnings
...
-Wall should be old enough.
Also use %empty instead of comments
2021-01-23 00:05:56 +01:00
Rangi
e3d355d976
Attempt to recover from syntax errors with bison
...
Fixes #595
2021-01-22 15:54:24 +01:00
ISSOtm
a679e02246
Get rid of asm.h and localasm.h
...
No need to make them global
2021-01-22 13:34:16 +01:00
ISSOtm
592e9b3725
Reorganize and comment better main()
2021-01-22 11:09:27 +01:00
ISSOtm
effc58241d
Rework defining variables on command-line
...
Avoids allocating memory
Detects CLI errors even when failing to open file
Reports symbols as defined on command-line instead of input line 0 (!?)
2021-01-22 11:03:43 +01:00
ISSOtm
3697065afc
Add asm/opt.c to CMakeLists
...
Fixes compiling with CMake
2021-01-22 11:01:33 +01:00
ISSOtm
fa0fa4d5ac
Significantly overhaul OPT code
...
Simplify the mess that was option setting (2 redundant variables !?)
Move options to a separate file
Have "modules" own their options, and OPT only access them (less redundancy)
Simplify code, respect naming conventions better
2021-01-22 10:41:09 +01:00
ISSOtm
5acc48fa54
Error out when given several input files
...
Also rename tzMainFile
2021-01-22 09:44:41 +01:00
ISSOtm
1487eebe79
Remove time counter
...
Nobody uses that, and it requires running extra code for each line
2021-01-22 08:51:57 +01:00
ISSOtm
993c034039
Avoid using EXPAND_AND_STR with external defines
...
There is no guarantee that they are purely numeric, use the values instead
2021-01-22 08:51:35 +01:00
ISSOtm
09f16bda4a
Use putc instead of fputc
...
Also rename some functions for consistency
2021-01-22 08:32:28 +01:00
ISSOtm
41d544a4eb
Rewrite RGBFIX
...
- Make it work inside pipelines
- Add RGBFIX tests to the suite
- Be more flexible in accepted MBC names
- Add warnings for dangerous or nonsensical input params
- Improve man page
2021-01-20 21:22:55 +01:00
Rangi
f28b4abafc
Fix a potential buffer overflow in strrpl
...
This caused an error using clang with -O3 -flto
2021-01-20 10:21:53 +01:00
ISSOtm
ca1c934629
Have CMake use specified compiler in CI, not system default
...
Otherwise it's just GCC on Linux and Clang on macOS...
2021-01-19 16:35:06 +01:00
Rangi
d5a00cf634
Comment cites the string hash algorithm (djb2)
...
"If you just want to have a good hash function,
and cannot wait, djb2 is one of the best string
hash functions I know."
2021-01-19 15:03:22 +01:00
Rangi
fb39c3a70e
Consistently refer to "directives", not "pseudo-ops"
...
Some docs and warnings already referred to SECTION and
db/dw/dl "directives", but others used "pseudo-ops".
2021-01-19 15:03:22 +01:00
ISSOtm
15ec6efc28
Fix missing newline in charmap override warning
2021-01-17 20:13:51 +01:00
Rangi
93d83e17dc
Don't override bison's internal 'yytnamerr' function
...
This is not used in all bison versions, which causes a
"defined but not used" warning for the 'rgbasm_yytnamerr'
replacement, treated as an error by 'make develop'.
2021-01-15 11:51:31 +01:00
Rangi
df16e64fc6
Handle MACRO and REPT/FOR bodies differently
...
Fixes #697
2021-01-15 02:16:37 +01:00
Rangi
a4ebb87858
Add Rangi to contributors
2021-01-14 18:36:10 +01:00
Rangi
5ef8e0a1f6
Use an IELR parser if available
2021-01-14 18:36:10 +01:00
Rangi
eb4952c188
Use more verbose syntax error messages
...
Fixes #385
2021-01-14 18:36:10 +01:00
ISSOtm
57b734a7df
Reinstate RL into the _RS family
...
Removal of colon-less labels lifted the grammar ambiguity that
prevented `RL` from being usable as a variable declarator.
Thus, reinstate its functionality.
2021-01-11 01:38:03 +01:00
ISSOtm
5be1c0da62
Fix intra-section ALIGN not computing offset correctly
2021-01-09 23:29:08 +01:00
ISSOtm
b598911e96
Enable LTO in release builds
...
Fixes #693
2021-01-09 20:31:15 +01:00
Rangi
cab9cb06a3
Store IF depth relative to each fstack context
...
This disallows starting/ending an IF inside an
INCLUDEd file or a macro expansion
2021-01-09 20:12:14 +01:00
Rangi
62bea23c49
Implement BREAK to exit REPT and FOR loops
...
Fixes #684
2021-01-08 21:13:23 +01:00
Rangi
7ce5cf1595
Convert floating to fixed point by rounding, not truncation
...
Fixes #678
2021-01-04 21:23:43 +01:00
Rangi
7e3fc1db03
Fix Actions CI for MSVC
...
Fixes #616
2021-01-04 02:01:25 +01:00
Rangi
77279984a5
Implement STRRPL
...
Fixes #660
STRRPL(str, "", new) does nothing
(warn about it with -Wempty-strrpl)
2021-01-04 00:20:35 +01:00
Rangi
669a392fcd
Revise the rgbasm(5) docs
2021-01-02 08:29:57 +01:00
ISSOtm
51ce0b038a
Remove removed features from documentation
2021-01-02 02:47:13 +01:00
ISSOtm
bd244e6865
Remove deprecated features
...
Trimming off the fat!
- GLOBAL and XDEF keywords
- Colon-less global labels
- *-comments
2021-01-02 02:42:44 +01:00