Skip to content

[BUG] Failure to parse float literals with no digits before the decimal point #90

@kitkat-24

Description

@kitkat-24

I noticed this trying to create an array to test plotting

runmat> x = 0:.1:10
Execution error: Failed to parse input 'x = 0:.1:10': Parse error at position 0: unexpected token '.' in expression context

But you can even trigger it with a simple

runmat> a = .1
Execution error: Failed to parse input 'a = .1': Parse error at position 0: unexpected token '.' in expression context

This is a pretty common Matlab usage that will break compatibility trying to run lots of existing code.

Tested with runmat v0.2.7 on Apple M3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions