Bug 6380 - bison reports conflicts in CSS parser
Summary: bison reports conflicts in CSS parser
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 8055
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-04 23:05 PST by Ricci Adams
Modified: 2008-07-28 09:48 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricci Adams 2006-01-04 23:05:24 PST
Upon checking a change to the JavaScript parser, I noticed that the CSS yacc file was reporting 37 shift/
reduce conflicts and 4 reduce/reduce conflicts.  Excerpt from build log below.

...
/bin/sh -c bison\ -d\ -p\ cssyy\ \"$INPUT_FILE_PATH\"\ -o\ \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.cpp
\"
cat\ \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.cpp.h\"\ \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.hpp\"\ >\ 
\"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.h\"\ 2>\ /dev/null\ ||\ echo\ -n
/Volumes/Home/Projects/WebKit/WebCore/khtml/css/parser.y contains 37 shift/reduce conflicts and 4 
reduce/reduce conflicts.
...
Comment 1 Geoffrey Garen 2006-01-05 09:09:17 PST
Is this a recent behavior change? (I checked in a change to the lexer on 1/4. Previously, I didn't think we 
had any conflicts.)
Comment 2 Geoffrey Garen 2006-01-08 18:10:01 PST
Disregard previous comment. I thought we were talking about the JS parser.
Comment 3 Darin Adler 2006-01-09 09:09:17 PST
When I removed all the conflicts from the JavaScript grammar, I took a lot at doing it for the CSS grammar 
too. One of the biggest challenges is the curious handling of whitespace (done because whitespace is 
significant in selector syntax, but could be done differently).
Comment 4 Christopher Jerome 2006-01-19 08:36:49 PST
(In reply to comment #0)
> Upon checking a change to the JavaScript parser, I noticed that the CSS yacc file was reporting 37 
shift/
> reduce conflicts and 4 reduce/reduce conflicts.  Excerpt from build log below.
> 
> ...
> /bin/sh -c bison\ -d\ -p\ cssyy\ \"$INPUT_FILE_PATH\"\ -o\ \"$DERIVED_FILE_DIR/
$INPUT_FILE_BASE.cpp
> \"
> cat\ \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.cpp.h\"\ \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.hpp
\"\ >\ 
> \"$DERIVED_FILE_DIR/$INPUT_FILE_BASE.h\"\ 2>\ /dev/null\ ||\ echo\ -n
> /Volumes/Home/Projects/WebKit/WebCore/khtml/css/parser.y contains 37 shift/reduce conflicts 
and 4 
> reduce/reduce conflicts.
> ...

I Have noticed this too, I have seen shift/reduce reduce/reduce conflicts for a while now. It is still the 
same. Also why are we not using bison 2.x.x on OS X? is there a particular 'technical' or engineering 
reason for this?
Comment 5 Robert Blaut 2008-07-28 02:59:26 PDT
I think the bug was fixed long time ago. Any confirmations?
Comment 6 Alexey Proskuryakov 2008-07-28 07:33:51 PDT
CSSGrammar.y has 49 shift/reduce conflicts now, which are silenced with an %expect. Assuming we have no reduce/reduce conflicts, I think that this can be closed - shift/reduce ones do not necessarily indicate real bugs.
Comment 7 Robert Blaut 2008-07-28 09:48:29 PDT
(In reply to comment #6)
> Assuming we have no reduce/reduce conflicts, I think that this can be
> closed - shift/reduce ones do not necessarily indicate real bugs.
> 

Done.