Kagehi
unread,Aug 17, 2012, 1:45:08 PM8/17/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scite-i...@googlegroups.com
Ok.. Been hacking my way through this thing a bit last night, and found a few obvious bugs, which kept it from loading, one glaring omission in an example, which left it not doing anything past the first two lines, which are comments.. Looks like the only problems I can't fix myself have to do with patterns. Mainly, what the heck is the difference between:
lpeg.P - pattern
lpeg.R - range
lpeg.S - set
lpeg.V - nter???
The names might imply what they do, but internally, looking at the code, they all eventually feed into "pattern", as a regex, some place, I think. But the page that is supposed to describe how to make a lexer like this a) barely mentions them, b) only gives examples of using P, and thus, pretty much, explains jack about how they work, what each one is limited to, or why (and V doesn't even have an internal name in the C code, which makes any sense without tracing that code and trying to figure out what its doing exactly.
Oh, right.. That the "style" block, at the bottom, while it obviously won't work for vector and quarternian, until I figure out how to match them properly, doesn't seem to be coloring events either. I figure, for sake of my sanity, I need those to color, and I wouldn't mined of "user created" ones colored some other way. Is their some hierarchy of coloring, where, for example, it will color numbers (the definition has a problem in that it colors them as parts of words..), then won't color something else containing them? How is that sorted out?