Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Simple Parser Combinator Implementation

by withering (Beadle)
on Sep 16, 2013 at 08:14 UTC ( #1054249=note: print w/ replies, xml ) Need Help??


in reply to Re: Simple Parser Combinator Implementation
in thread Simple Parser Combinator Implementation

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.


Comment on Re^2: Simple Parser Combinator Implementation
Re^3: Simple Parser Combinator Implementation
by raiph (Hermit) on Sep 18, 2013 at 08:47 UTC
    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://1054249]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-12-25 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls