Skip to content

PLASM compiler crashes if invoked with a space between "+" and PLASM #53

@ZornsLemma

Description

@ZornsLemma

If I invoke the PLASM self-hosted compiler as "+ PLASM TEST.PLA", it crashes; here's a screenshot of this in an Apple II emulator:
Screenshot at 2019-05-10 21-37-31
I think at least part of the issue is that the core VM strips away the space between the "+" and "PLASM", so it's able to successfully execute the PLASM module, but the argument parsing code in the ARGS module returns "+" and then "PLASM" as the first and second arguments.

I think the actual crash is caused by PLASM trying to load itself as source code, as if we'd typed "+PLASM PLASM", and crashing because the file is not text; I seem to be able to get a similar crash by typing that. I don't know if this is worth fixing; perhaps just changing the parsing so the core VM and ARGS are consistent in handling a space between the leading "+" and the module name would be adequate.

ETA: The commit in my repo which references this just notes that I found the problem; I am playing around with alternative implementation details on the Acorn port, that commit is not any kind of fix or suggestion for this issue and you should just ignore github being helpful and mentioning it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions