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

Re: Whitespace-important parsing with Parse::RecDescent (eg. HAML, Python)

by Anonymous Monk
on Jan 21, 2016 at 00:22 UTC ( #1153223=note: print w/replies, xml ) Need Help??


in reply to Whitespace-important parsing with Parse::RecDescent (eg. HAML, Python)

Are you aware Text::Haml exists?

https://metacpan.org/pod/Parse::RecDescent::FAQ::Original has some things to say about "whitespace", but you're already using <skip: so maybe you've seen it

I may have been tempted to play with it if the example was self contained :)

  • Comment on Re: Whitespace-important parsing with Parse::RecDescent (eg. HAML, Python)
  • Download Code

Replies are listed 'Best First'.
Re^2: Whitespace-important parsing with Parse::RecDescent (eg. HAML, Python)
by aufflick (Deacon) on Jan 21, 2016 at 02:02 UTC
    And thanks for the FAQ link. I had looked through that and somehow had missed the whitespace example from DC. It makes sense - I didn't want to use a regex but DC seems to suggest that the sort of backtracking needed PRD doesn't support. If I can't make it work I'll gist a self contained example for you to play with :)
Re^2: Whitespace-important parsing with Parse::RecDescent (eg. HAML, Python)
by aufflick (Deacon) on Jan 21, 2016 at 01:59 UTC
    Yes, and in fact I have a few pull requests against it and have been chatting with the author. Ultimately I'd like to write one from scratch though - there are some features missing from Text::HAML (eg. the standard helpers like surround) which will require a lot of refactoring to Text::HAML to implement. At least I'd like to try and see how it goes :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2023-11-30 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?