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
F13053802: D14376.id34712.diff
Fri, Apr 19, 11:29 AM
F13048604: D14376.diff
Thu, Apr 18, 9:34 PM
Unknown Object (File)
Wed, Apr 3, 1:09 PM
Unknown Object (File)
Wed, Apr 3, 12:33 PM
Unknown Object (File)
Mon, Apr 1, 8:19 PM
Unknown Object (File)
Fri, Mar 29, 3:51 PM
Unknown Object (File)
Mar 9 2024, 2:04 PM
Unknown Object (File)
Feb 12 2024, 1:02 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.