This is mainly for testing purposes. Defaults to creating an ain v4
file, which is the same version produced by the SDK compiler.
Also various small improvements so that output matches the SDK compiler:
* add "0" function (currently does nothing)
* add "NULL" function
* compile null return at the end of every function
* set main function index in ain file
Initial support for compiling .jaf (System 4 language) files. So far
this is limited to adding struct definitions and declaring new globals.
The actual bytecode compilation is not yet implemented.
This Bison grammar is based on a C grammar and should cover 95% of the
System 4 language syntax already, though many AST nodes are not yet
implemented.
.S_LOCALASSIGN is now named .STACK_LOCALASSIGN
.STRING_LOCALASSIGN is now named .S_LOCALASSIGN
.S_PUSH is removed (redundant)
This is a breaking change.
Remove the --inline-strings option and implement this behavior as the
default (removing the old behavior). This is done for string only;
messages are still given as integers.
This implementation is a bit different than the broken implementation it
replaces: instead of trying to completely rebuild the string table from
scratch, we simply leave the string table as-is and do a hash-table
lookup to get the corresponding index for all string arguments. If the
string cannot be found, then it is added at the end of the table.
This is NOT implemented for messages because the message table can
contain many duplicate strings and the message index actually matters
for the purpose of tracking previously read messages.
This is a breaking change.
.LOCALINC2/.LOCALDEC2 are semantically identical to .LOCALINC/.LOCALDEC
except that they represent an uglier instruction sequence which is
frequently used in Rance 10.
.LOCALPLUSA/.LOCALMINUSA and .STRING_LOCALASSIGN do what you would
expect.
Support for Evenicle 2 and Haha Ranman.
There are a few changes in v14:
* a number of new instructions (semantics yet unknown)
* HLL function arguments and return values can now be complex types
(e.g. arrays, enums)
* support for nested arrays (this isn't necessarily new, but it doesn't
occur in Rance X at all)
Assembler ops which add a new string/message to the ain file and emit an
S_PUSH/MSG instruction. E.g. to display a message box in Rance 10:
.S_PUSH "test"
CALLHLL system MsgBox -1
DELETE
The .STR and (old) .MSG ops are renamed to .SETSTR and .SETMSG.
This is a breaking change.
Same idea as LOCALREF/GLOBALREF, etc. except for accessing struct
members inside of a member function. This is a bit trickier since it
requires knowing which functions belong to which structs, which isn't
directly encoded in the AIN format.
This is not really a standard ini file, so a custom parser is needed to
access all of the information stored in it (specifically, lists like
"LoadDLL").
This commit also makes flex/bison a hard dependency.
Need to use libiconv on Windows. libiconv doesn't accept all of the same
encoding names as the glibc iconv. In particular, CP932 needs to be used
instead of SJIS-WIN.
Use iconv instead of utfsjis.h so that text encodings other than UTF-8
and SJIS can be used. For three reasons:
* to allow using other encodings for dumped files (e.g. UTF-16, SJIS)
* to support existing Chinese translations, which use GBK-encoded text
* to support theoretical translations to other languages that can't be
represented in SJIS
Tool for reading and rebuilding dumped .ex files. Currently this only
reads a file on stdin then redumps it to stdout.
Also, move tools code into src/tools/