aebabis / factorio-state-machine

MIT License
15 stars 8 forks source link

Add support for alphanumeric labels #39

Open louga31 opened 1 year ago

louga31 commented 1 year ago

This pull request add support for alphanumeric labels. I have added tests to it.

Currently, it only works with labels without numbers, I'm new to the Moo library and I couldn't get it to match my string "type", it always match number or id (if I put string above them it breaks everything). If this parsing issue is fixed, the rest of the code should support label names with numbers.

aebabis commented 1 year ago

Sorry. I didn't notice your PR comment, only your commit messages; now I understand you're aware there are bugs.

I don't know if I'll have the time to locate and fix the bug, but if you can add a 3rd test that should pass but fails, I'll at least take a stab at it.

louga31 commented 1 year ago

Sorry. I didn't notice your PR comment, only your commit messages; now I understand you're aware there are bugs.

I don't know if I'll have the time to locate and fix the bug, but if you can add a 3rd test that should pass but fails, I'll at least take a stab at it.

I will add tests for this and the mix of named and integer labels

louga31 commented 1 year ago

The lastest commit fixes the issue, now I need to improve the code and do some cleanup and it should be ready

aebabis commented 1 year ago

@louga31 I pulled this down and tried to fix it. I struggled because I've forgotten how to deal with lexer ambiguities and don't currently have time to relearn. Would you happen to know anyone who can look at grammar.ne?