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)
Thu, Nov 24, 2:49 AM
Unknown Object (File)
Thu, Nov 17, 10:41 PM
Unknown Object (File)
Thu, Nov 17, 10:41 PM
Unknown Object (File)
Thu, Nov 17, 10:40 PM
Unknown Object (File)
Wed, Nov 16, 9:22 AM
Unknown Object (File)
Tue, Nov 15, 10:55 PM
Unknown Object (File)
Wed, Nov 9, 10:53 PM
Unknown Object (File)
Wed, Nov 9, 10:53 PM

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.