Closed ravecoyote closed 9 years ago
Please attach the schemedef you're trying to use, I'll see if I can work out what's happening when I get some time.
Hi Simon,
attached you find the schemedef file. I'd be really happy if you could help.
Thanks Kristo
Simon Steele mailto:notifications@github.com Mittwoch, 22. Januar 2014 11:51
Please attach the schemedef you're trying to use, I'll see if I can work out what's happening when I get some time.
— Reply to this email directly or view it on GitHub https://github.com/simonsteele/pn/issues/6#issuecomment-33011155.
Hmm, sadly attachments don't work for the github tracker. Please either put it in the text, or (better) follow the instructions here to create a gist and send me the link: https://github.com/ned14/BEurtle/issues/1
Here's the download link for the relevant schemedef and a source sample file:
Cheers
Simon Steele mailto:notifications@github.com Mittwoch, 22. Januar 2014 11:51
Please attach the schemedef you're trying to use, I'll see if I can work out what's happening when I get some time.
— Reply to this email directly or view it on GitHub https://github.com/simonsteele/pn/issues/6#issuecomment-33011155.
Ok, I think in this case it's because numbers have a higher priority than comments (which is perhaps a mistake). -- matches both your comment configuration, and also your number configuration (starts with -, contains -).
I think if you remove the ability to start a number with -, then it should work?
e.g.
<numbers start="[0-9]" content="[0-9.]" />
Let me know!
Hi Simon,
I've already tried that countless times. But that doesn't seem to make any difference at all.
Cheers
Simon Steele schrieb:
|
|
Ah, apologies, so it's not just numbers that take preference but also keywords. If unspecified keywords have a start set that includes '-' as well. So the combination of these two works for me:
<keywords start="[a-zA-Z0-9_]" />
<numbers start="[0-9]" content="[0-9.]" />
Aaaaah... now that did it! I'm really glad you could help me here.
One more question though: Please take a quick look at this piece of Alan3 code:
Exit south To bar Does If cloak In hero Then Locate hero At dark_bar. Else Locate hero At bar. End If. End Exit.
Can I somehow make PN recognize the integrity of such control structures. Something like
Begin_keywords: If then in Middle_keywords: else End_keywords:"end if"
Cheers
Simon Steele schrieb:
There's no way to do this with a custom schemedef, you'd need to write a Scintilla lexer in C++ and it would be non-trivial - most lexers avoid needing to keep much state between lines.
Trying desperately to create a schemedef for AlanIF - an adventure language like Inform6.
For this I have to declare a double dash -- as the beginning of a line comment. This seems to be completely ignored by PN. PN tries to parse the comment lines without recognizing them as comments.
Please help. This bug is driving me nuts.