[Solved] Where can I find Webkit’s CSS grammar files? [closed]


The bison file (or at least, a version of it) is in the css directory as CSSGrammar.y.in. That file is preprocessed and then run through bison using a perl script.

Apparently the flex scanner was rewritten in 2011/12; see this webkit bug. The handbuilt scanner is part of CSSParser.cpp.

By looking back in the git history, you could find older versions. For example, in the safari-4-branch, I found the following bison and flex files.

solved Where can I find Webkit’s CSS grammar files? [closed]