Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://179759]
help
Chatterbox?
[james28909]: my scratchpad
[james28909]: and like i say, is just an example, not working code, but hopefully you understand what i mean. :)
[james28909]: and like i say, it would be alot of work to get around renaming 3 subs haha
[Lady_Aleena]: Well, you would have to add the file munging and a lot more.
[james28909]: yeah but it would rename those subs xD
[Lady_Aleena]: I'd say, go back to my scratchpad, and really look at what the 3 subs are doing, then play. Meanwhile, I am going afk for about an hour +/- a few minutes.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2017-05-24 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?