grendrake / glulx-assemble Goto Github PK
View Code? Open in Web Editor NEWSimple assembler for glulx game files.
License: MIT License
Simple assembler for glulx game files.
License: MIT License
Hi @GrenDrake,
I'm drafting a glulx-assemble syntax definition for my editor (Sublime Text) to add syntax highlighting and other editing features. I just need to ask you some clarifications about some syntax items.
I've peeked at the source files, but I'm not 100% sure about valid characters in identifiers. I gather that they can be represented by the following RegEx:
[a-zA-Z_]+
But in the source I noticed:
static int is_identifier(int ch) {
return isalnum(ch) || ch == '.' || ch == '_';
}
Questions:
.
) a valid character in identifiers too? or is it just used in directives?Again, by looking at the source it looks like the valid escape sequences inside strings are: \\
, \"
, \'
and \n
.
\t
, \
, etc....
Hopefully I'll soon be able to publish on GitHub a working Alpha of the package, and eventually it might become a full fledged package shared on Package Control (but right now my goal is just to be able to comfortably edit Glux assembler sources).
Thanks for this great tool! There was really a need for an up-to-date Glulx assembler.
On Windows, when I try to assemble the source files from the demos
folder I get the following errors (due to native EOL being CRLF
):
basic.ga:61:4 unexpected character; \ only permitted at end of line
basic.ga:61:22 unexpected character; \ only permitted at end of line
basic.ga:61:27 unexpected character; \ only permitted at end of line
basic.ga:61:1 expected identifier
Errors occured during parse & build.
minimal.ga:13:1 unknown mnemonic in
Errors occured during parse & build.
glk.ga:267:33 unterminated string
Errors occured during preprocessing.
But if I convert the sources' EOL to Linux style (LF
) these errors dissapear.
Any chance you could add support for CRLF
too on the Windows version?
Or, should the .ga
source files always employ LF
?
In this case, it might be worthy adding a .gitattributes
setting to enforce Unix style EOLs in the demo files, as well as a notice about EOLs enforcement. The current project setting, when cloning the project locally on a Windows machine, will make Git normalize EOLs of .ga
files to CRLF
.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.