Page MenuHomePhabricator

Allow XHPAST to be built without flex and bison
ClosedPublic

Authored by joshuaspence on Nov 1 2015, 8:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 7:45 PM
Unknown Object (File)
Mon, Nov 18, 11:44 AM
Unknown Object (File)
Fri, Nov 15, 3:43 PM
Unknown Object (File)
Thu, Nov 14, 9:24 PM
Unknown Object (File)
Thu, Nov 14, 5:02 AM
Unknown Object (File)
Mon, Nov 11, 2:15 AM
Unknown Object (File)
Wed, Nov 6, 9:08 PM
Unknown Object (File)
Fri, Nov 1, 7:00 AM

Details

Summary

Fixes T9289. This is a bit hacky, but feels like a reasonable workaround. Basically, add SKIP_PARSER and SKIP_SCANNER flags to the Makefile. If these flags are present then the Makefile effectively behaves like this:

%.lex.hpp %.lex.cpp: %.l
    touch $*.lex.hpp $*.lex.cpp
        
%.yacc.hpp %.yacc.cpp: %.y
    touch $*.yacc.hpp $*.yacc.cpp

If users are compiling XHPAST with libphutil/scripts/build_xhpast.php (which is the recommendation method) then there should be no difference here because this script will pass SKIP_PARSER=1 SKIP_LEXER=1.

Test Plan

Played around with make and confirmed that the flags behaved as expected.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Allow XHPAST to be built without flex and bison.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
tycho.tatitscheff added inline comments.
support/xhpast/Makefile
6

Is that lint intended for Makefile by the way.

support/xhpast/Makefile
6

I have a diff floating around which modifies ArcanistTextLinter to support reading from .editorconfig. If I ever finish that diff off, an error wouldn't be raised here.

epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 1 2015, 11:54 PM

👍

support/xhpast/Makefile
6

Also, this file is not highlighted by default.

support/xhpast/Makefile
6

See T3626.

This revision was automatically updated to reflect the committed changes.