Racc error recovery
4 Message(s) by 3 Author(s) originally posted in ruby programming
| From: Aaron Patterson |
Date: Wednesday, October 24, 2007
|
Hi everyone,
I'm writing a racc parser, and I need to recover from parse
error s.
Basically I'm writing a
CSS parser, and I need to
handle poorly
formatted CSS.
Unfortunately I can not seem to find any good
documentation or examples on
error recovery. I have read the Racc documentation about on_error and
entering "error recovering mode", as well as calling yyerrok to leave
error recovering mode, but I do not know what that actually means.
I have also discovered the "error" rule, but I do not want to explicitly
add that rule to every rule that could possibly have an error.
Any tips'd be greatly appreciated. Thanks!
--
Aaron Patterson
http://tenderlovemaking.com/
| From: Giles Bowkett |
Date: Thursday, October 25, 2007
|
I'm writing a racc parser, and I need to recover from parse errors.
..
Unfortunately I can not seem to find any good documentation or examples on
error recovery. I have read the Racc documentation about on_error and
Wild stab in the dark: is there any equivalent stuff in
yacc you could
use as a starting point?
I realize it probably is not modeled that closely, but that's the first
thought I had.
Wild stab in the dark, part 2: tried using Sass instead? It's a CSS
DSL. Or do you've to work with the CSS you have already got?
--
Giles Bowkett
Blog:
http://gilesbowkett.blogspot.com
Portfolio:
http://www.gilesgoatboy.org
Tumblelog:
http://giles.tumblr.com/
| From: Aaron Patterson |
Date: Friday, October 26, 2007
|
wrote in message:
> I'm writing a racc parser, and I need to recover from parse errors.
...
> Unfortunately I can not seem to find any good documentation or examples on
> error recovery. I have read the Racc documentation about on_error and
Wild stab in the dark: is there any equivalent stuff in yacc you could
use as a starting point?
Yes there is. I was hoping I could get an answer without digging up my
lex & yacc book. ;-) Fortunately I found it and there is an error
recovery section that has definitely helped.
I realize it probably is not modeled that closely, but that's the first
thought I had.
Wild stab in the dark, part 2: tried using Sass instead? It's a CSS
DSL. Or do you've to work with the CSS you have already got?
No. I'm trying to parse CSS, not
generate it.
--
Aaron Patterson
http://tenderlovemaking.com/
| From: barjunk |
Date: Sunday, October 28, 2007
|
On Oct 25, 10:29 pm, Aaron Patterson
<aa...@xxxxxxxxxxx>
wrote in message:
wrote in message:
> > I'm writing a racc parser, and I need to recover from parse errors.
> ...
> > Unfortunately I can not seem to find any good documentation or examples on
> > error recovery. I have read the Racc documentation about on_error and
> Wild stab in the dark: is there any equivalent stuff in yacc you could
> use as a starting point?
Yes there is. I was hoping I could get an answer without digging up my
lex & yacc book. ;-) Fortunately I found it and there is an error
recovery section that has definitely helped.
> I realize it probably is not modeled that closely, but that's the first
> thought I had.
> Wild stab in the dark, part 2: tried using Sass instead? It's a CSS
> DSL. Or do you've to work with the CSS you have already got?
No. I'm trying to parse CSS, not generate it.
--
Aaron Patterson
http://tenderlovemaking.com/
Aaron,
Would you mind sharing some of what you found in the book? I'm more
interested in what you were thinking originally and then what the book
had to say to change your mind.
I'm interested in putting together some more documentation for Racc.
Mike B.
Next Message: .each do |foo, bar| what does bar do?
Blogs related to Racc error recovery
Featuring almost everything from new and used products.
93 0 7878 428 zelda fitzgerald yamaha radiator
cover driverexs herniated disc, on-site treatment male and female praying mantids inflatable bouncers wholesale village of freeport teresa davey veolia philadelphia parking authority
...
Online version of the popular print magazine.
92 305 406 1352 Cakes, greentown indiana materials to
cover jigs talking to guys peperoncino diabete rock city hawthorne vba timer example. bamboo cane fishing pole. seymour heath side effects of turmeric trinity mines aps ontario
...