Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Simple Parser Combinator Implementation

by raiph (Hermit)
on Sep 12, 2013 at 15:23 UTC ( #1053745=note: print w/ replies, xml ) Need Help??


in reply to Simple Parser Combinator Implementation

I would love to see a dialog comparing withering's work with Perl 6's comparable features. If you know both, please summarize how they are similar and how they are different. If you know just parser combinators, or just Perl 6, please ask some questions to get things rolling. Here's hoping someone jumps in and we have an informative exchange. :)


Comment on Re: Simple Parser Combinator Implementation
Re^2: Simple Parser Combinator Implementation
by withering (Sexton) on Sep 16, 2013 at 08:14 UTC

    That's a good point. I searched Perl 6 PEG and found it really powerful. Glad that PEG is now a core part of the language - it's rather exciting to write embedded DSLs with PEG, and if the implementation uses memoization, we could expect a better performance than native parser combinators ( and no worse than memoized combinators ) and a little more convenience than Frost's memoized combinators, which need some wrappers for handle real-world tokens.

    I'm not sure whether PEG in Perl 6 can handle ambiguous grammars or not. Parser combinators were designed to parse natural language sentences at first but were also found useful for parsing programming languages later. It seems not so necessary for PEG to choose the first match if the implementation can endure the memory cost when generating the intermediate representation.

      I suspect no one's going to bite here at PM. I encourage you to visit with Perl 6 folk on the #perl6 IRC channel and ask about Perl 6's PEG, its current and anticipated future performance, Graham Hutton's work, boost.spirit, your code, and development of related modules on CPAN for Perl 5. Larry Wall is often on the channel with the nick TimToady and I'm fairly confident he'll be delighted to discuss such matters. And you might bump into Patrick Michaud who has written numerous grammar engines over the years to match Perl 6's evolving design.

      (I read and summarize the daily logs so I'll see your discussion there.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-09-18 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (101 votes), past polls