Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Parsing with Perl 6

by jryan (Vicar)
on Jul 05, 2002 at 23:04 UTC ( #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.


Comment on Re: Re: Parsing with Perl 6
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-11-01 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    If a safe, affordable anti-ageing treatment that extended life indefinitely were to become available, would you take it?



    Results (7 votes), past polls