Connor Olding
de2618bb61
allow expressions in variable definitions
2016-11-27 21:01:30 -08:00
Connor Olding
067267c313
allow Preproc to throw errors again
2016-11-27 20:28:53 -08:00
Connor Olding
3c1cbf0901
remove defunct comments
2016-11-27 20:03:26 -08:00
Connor Olding
437b816f85
refactor label resolution into its own method
2016-11-27 20:03:23 -08:00
Connor Olding
2143128628
split Preproc expansion into Expander class
2016-11-27 15:14:51 -08:00
Connor Olding
3aa5d01a21
refactor some utility functions
2016-11-27 14:02:28 -08:00
Connor Olding
cdc0f8edb2
add a barebones expression parser
...
at the moment, this probably only works in directives.
some of the operators are still unimplemented, and the errors are poor.
there will be support for accessing variables in the future.
2016-10-14 09:27:19 -07:00
Connor Olding
dcdfc22f0a
implement basic CALL pseudo-instruction
2016-05-18 01:48:15 -07:00
Connor Olding
51820234a8
allow VARSYMs in directives
2016-05-01 03:56:56 -07:00
Connor Olding
6b0d27ba6d
allow 1 register in place of 2, pseudo stuff…
...
allow CL to take more than one argument.
implement pseudo-instructions NEGU, SGT, and SGTU.
2016-04-26 02:36:19 -07:00
Connor Olding
f851540b24
various fixes, mostly for labels
...
reimplement modulo by 0x80000000 for labels.
allow numeric label values ("REL") to be "fixed" to bypass label calculation.
add offsets after label calculation instead of before.
properly check for EOL after all expected arguments have been exhausted.
finally, add token properties to debug dumps.
2016-04-24 03:55:12 -07:00
Connor Olding
1188543cd2
more verbose errors
2016-04-23 16:24:46 -07:00
Connor Olding
694f09c9e0
clean up some of my mess
2016-04-21 03:35:17 -07:00
Connor Olding
14e397a7a8
get a bunch of overrides working again
2016-04-21 00:28:50 -07:00
Connor Olding
027485543c
assemble basic instructions again
2016-04-20 20:55:28 -07:00
Connor Olding
433d25a457
reimplement variables and relative labels
2016-04-20 18:26:18 -07:00
Connor Olding
91e028ef6a
rename internal DEF to VAR
2016-04-20 16:28:59 -07:00
Connor Olding
d10c0f0ee9
use Base class pattern; extend off existing classes
2016-04-20 13:15:17 -07:00
Connor Olding
7ccc2b180f
rename "defines" to "variables"
...
this follows bass' terminology:
constants don't care where they're defined, but can never be changed.
variables must be defined before use, but can be redefined.
defines aren't necessarily numbers.
bass: https://github.com/ARM9/bass
2016-04-20 01:41:44 -07:00
Connor Olding
071169df48
redo internal paths/requires
2016-04-14 07:33:33 -07:00
Connor Olding
5c91e09151
fix backwards relative labels
2016-04-10 08:41:52 -07:00
Connor Olding
b8601031f3
add named relative labels
2016-04-10 05:09:38 -07:00
Connor Olding
5afb743977
fix unary preprocessing
2016-04-10 03:39:50 -07:00
Connor Olding
311b1e362f
implement offsets for constants
2016-04-10 03:25:11 -07:00
Connor Olding
07c68b6229
implement basic specials; more refactoring
2016-01-15 20:34:37 -08:00
Connor Olding
195236a52c
begin work on specials; big refactor
2016-01-15 11:15:02 -08:00
Connor Olding
659bec36f8
reimplement defines
...
defines now resolve to the previous definition, rather than the lastmost.
also, defines are invisible to the parser now.
2016-01-14 17:29:45 -08:00
Connor Olding
61cd69004f
split out token-handling and preprocessing
2016-01-14 16:31:24 -08:00