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

Re^5: Problem with capturing all matches with regex

by duelafn (Vicar)
on Oct 13, 2016 at 09:07 UTC ( #1173916=note: print w/replies, xml ) Need Help??


in reply to Re^4: Problem with capturing all matches with regex
in thread Problem with capturing all matches with regex

At that point (three pages of parsing regexps), I think you are well into the territory where you should use a grammar engine. For instance, Parse-RecDescent, or my preferred, Marpa-R2

Good Day,
    Dean

  • Comment on Re^5: Problem with capturing all matches with regex

Replies are listed 'Best First'.
Re^6: Problem with capturing all matches with regex
by igoryonya (Monk) on Oct 15, 2016 at 07:20 UTC
    Seams, like grammar engine is a cool thing, but I am not getting it.
    I've read descriptions and readmes about both libraries that You've suggested, but the only thing that I can find, is that they are for source code parcing.
    Looked at term "grammar engine" on the inet and on wikipedia. Found nothing useful, and pretty much the same, as what I've said above.
    How is it compared to regex?

      Grammars are for parsing data, not just code (which is a subset of data). For example, see demo_PerlCSV.pl from the Parse::RecDescent demo directory.

        I looked at demos and documentation of that lib. It was over my head. I didn't understand anything.
        Tried to do some more searches about grammar engine on various search engines and tech portals, but didn't find any sane explanation of what it is, how it works and what it's used for. I just can't figure out, how it works and how I can utilize it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2021-02-27 03:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?