so, i (almost) finished the core of the M30W parser, and i'll upload it as soon as i fix my firewall
but i'm stuck with in-line comments
i can't get a regex pattern to distinguish between
a block #a comment say 'a # sign' for 5 seconds 'a string #' #lalala
anybody?
Last edited by roijac (2012-05-28 15:21:52)
Offline
Check for a quote before and after?
Offline
What are you using to parse quotes in the first place?
I'm not sure regex are quite the right thing for writing a parser like this...
It gets kinda messy. Then again, my attempts to write a scratchblocks parser using Construct didn't work out too well — so I probably can't claim much authority on the subject.
I believe the "correct" way of doing this is to define a grammar, rather formally, and use a proper parser to actually parse the code. It's all very computer sciency. ._.
Offline