Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Parsing with Perl 6

by jryan (Vicar)
on Jul 05, 2002 at 23:04 UTC ( [id://179759]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing with Perl 6
in thread Parsing with Perl 6

Ah, you are completely right about \N, of course. I'm just a blockhead ;(

Concerning quotes: I think that the way I structured mine is easier to convert from logic. For instance, I defined a quoted string as:

- start quote - string of (non-quote or backslashed quote) characters - end quote

Which I then translated into (comments added this time):

rule quoted_string { " # start quote [ # string <-["]>+: # non quote characters | # or [ <after \\ > " ] # backslashed quote character ]* # end string " # end quote }

It was then shown how to make it "dynamic" by simply adding an argument and subsituting that argument in for the quote delimeter. While yours is much more elegant and efficient, I thought that my example was easier to follow in the current context.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found