develooper Front page | perl.recdescent | Postings from November 2004

dealing with line-oriented data (revisited)

From:
Terrence Brannon
Date:
November 30, 2004 01:39
Subject:
dealing with line-oriented data (revisited)
Message ID:
41AC3FBE.60600@hcoop.net
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, terry@hcoop.net




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About