[webkit-reviews] review granted: [Bug 94290] Pre-process CSSGrammar.y before running through bison. : [Attachment 167860] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 9 16:24:25 PDT 2012


Tony Chang <tony at chromium.org> has granted Pablo Flouret
<pablof at motorola.com>'s request for review:
Bug 94290: Pre-process CSSGrammar.y before running through bison.
https://bugs.webkit.org/show_bug.cgi?id=94290

Attachment 167860: Patch
https://bugs.webkit.org/attachment.cgi?id=167860&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=167860&action=review


LGTM assuming all the ews bots go green.  The feedback on the python script are
minor, so feel free to ignore.

> Source/WebCore/WebCore.gyp/scripts/action_preprocessgrammar.py:62
> +if len(arguments) == 0:
> +    exit_with_usage(1)

Nit: "if not len(arguments):" would be more like WebKit style.

> Source/WebCore/WebCore.gyp/scripts/action_preprocessgrammar.py:76
> +gcc_exe = "gcc"
> +if "CC" in os.environ:
> +    gcc_exe = os.environ["CC"]

Nit: This could just be gcc_exe = os.environ.get("CC", "gcc").

> Source/WebCore/WebCore.gyp/scripts/action_preprocessgrammar.py:86
> +output_file = open(os.path.join(output_dir, os.path.basename(input_root)),
"w")

Nit: Using 'with' for files would automatically close it for you.  It's a bit
more idiomatic.


More information about the webkit-reviews mailing list