Re: Line continuation characters
[email protected] (Marc Mims)
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <20011018154917.A31922@penguin> |
* Randal L. Schwartz <[email protected]>: > Ted> Because Marc's grammar seems to be otherwise line-oriented, I'd > Ted> suggest preprocessing the grammar input to merge lines as needed, to > Ted> simplify the grammar. The major disadvantage would be that line > Ted> numbers would be off when reporting errors though. > > "line oriented grammar" => "requires preprocessing" doesn't seem to be > very supportable logic. There's nothing inherent in P::RD that > requires the grammar to be non-line-oriented. > > Now "metagrammar can appear within tokens" implies a need for a > preprocessing layer. But from what I saw for examples, the > metagrammar (line continuation) appears only outside of tokens, so > that means it can be built into the skip matching logic. > > Don't overcomplicate the design... until you have to. :) I'm *attempting* to convert some old IBM System/36 Operation Control Language (OCL) procedures to a somewhat newer language, CL. Both languages are line oriented. OCL is interpreted, while CL is compiled. I took Ted's suggestion for expediency while I get a handle on the grammar. (I have been unable to find any BNF description for either language.) I did so because I was unable to find a way to get the skip directive you provided earlier to work: <skip: '(?:[ \t]+|\+\n)+'> commandline /\n/ Ken <[email protected]> responded similarly. -Marc