dealing with line-oriented data (revisited)
[email protected] (Terrence Brannon) Tue, 30 Nov 2004 01:39:10 -0800
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <[email protected]> |
--------------020109040702060809080203
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I wanted to add an entry in the FAQ for recdescent based on this question:
http://www.perlmonks.org/?node_id=407865
but I am not so sure about Randal's answer... it appears irrelevant to
the question at hand.
<skip> appears to be used to discriminate terminals in a production. I
don't think skip is going to affect or make a statement about the fact
that each sentence of the grammar terminates with a carriage return.
Any input into the way to structure a prd grammar so that it is clear
that each production is terminated by a newline is appreciated....
though I'm beginning to see the light myself:
program : statement(s)
statement : command arg(s) /[\n]/
command: /\w+/
args : /\d+/ | alphanum
alphanum : /[A-Za-z0-9/
--
Terrence Brannon, [email protected]
--------------020109040702060809080203--