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
F14012034: D14376.id34712.diff
Fri, Nov 1, 7:00 AM
F13999904: D14376.diff
Thu, Oct 24, 5:56 PM
F13984955: D14376.id34708.diff
Sun, Oct 20, 5:08 PM
F13982648: D14376.id.diff
Sun, Oct 20, 12:53 AM
F13975261: D14376.id34712.diff
Fri, Oct 18, 9:25 AM
Unknown Object (File)
Oct 2 2024, 9:16 AM
Unknown Object (File)
Sep 30 2024, 5:59 PM
Unknown Object (File)
Sep 21 2024, 12:42 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
Branch
master
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsupport/xhpast/Makefile:6TXT2Tab Literal
Unit
Tests Passed
Build Status
Buildable 8519
Build 9825: Run Core Tests
Build 9824: arc lint + arc unit

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.