| | Re: regular expressions for DAT file subpart lines
|
| (...) Arg. Is this allowed? I guess it should be; the original parser was implemented using Pascal... Yes, ugly getting it is, hmmm? :-, if( $linein =~ m/ ^ \s*1 # indicates a subpart \s+([0-9]+) # color (?:\s+[+-]?[0-9]+(?:...-9+])?){3} # (...) (25 years ago, 23-Jun-99, to lugnet.off-topic.geek)
| | | | Re: regular expressions for DAT file subpart lines
|
| Oops, I forgot a few other odd things. I *think* your expression allows these, but I'm not sure: .1 -.1 0. -0. 001 1E BTW, the color-code can be in scientific notation. The line-type can't, at least, it can't in LDLite. I'm betting LDraw would (...) (25 years ago, 23-Jun-99, to lugnet.off-topic.geek)
| | | | "Well-Formed" LDraw (Was: regular expressions for DAT file subpart lines)
|
| (...) Nope, won't take a fraction w/o the integer part; gotta fix that (...) Nope, same reason as above (...) Nope, won't take a fraction w/o the fraction part, gotta fix that (...) Nope, same reason as above (...) Yep! Woo-Hoo!!! :-, (...) Nope, I (...) (25 years ago, 23-Jun-99, to lugnet.off-topic.geek, lugnet.cad.dev)
| | | | Re: "Well-Formed" LDraw (Was: regular expressions for DAT file subpart lines)
|
| (...) Both of the above are common output from LDAO code. (...) Well, I was just throwing stuff out. I don't know if LDraw would take that one, or not. (...) Darned context-sensitive constructions. (...) I didn't say they made sense. Just that they (...) (25 years ago, 24-Jun-99, to lugnet.off-topic.geek, lugnet.cad.dev)
| | | | Re: "Well-Formed" LDraw (Was: regular expressions for DAT file subpart lines)
|
| Hey now, that's beginning to look like the yacc grammer for LDRAW in the LDLite source code. If you want to get precise in the language spec, grab the LDLite lex and yacc files and either take them as the defacto standard or modify them to handle (...) (25 years ago, 25-Jun-99, to lugnet.off-topic.geek, lugnet.cad.dev)
| | | | Re: "Well-Formed" LDraw (Was: regular expressions for DAT file subpart lines)
|
| (...) Oh, good. Then I wrote something close to correct. :) (...) That's probably a good idea. Most people will just scratch their heads at them, but some people would find it useful. Steve (25 years ago, 25-Jun-99, to lugnet.off-topic.geek, lugnet.cad.dev)
| |