Git Product home page Git Product logo

glulx-assemble's People

Contributors

grendrake avatar tajmone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tajmone

glulx-assemble's Issues

Question About Syntax Elements

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.

Identifiers

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:

  • Is the dot (.) a valid character in identifiers too? or is it just used in directives?
  • So, numbers are never allowed in identifier? (i.e. not even after the first character)

String Escapes

Again, by looking at the source it looks like the valid escape sequences inside strings are: \\, \", \' and \n.

  • Any others which I've left out?
  • Should remaining escaped be treated as "invalid escapes" (i.e, highlighted as errors)? e.g. \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).

Compile Errors With Windows Native EOL

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.