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)
Sat, Jan 28, 5:31 AM
Unknown Object (File)
Thu, Jan 12, 9:12 PM
Unknown Object (File)
Wed, Jan 4, 2:49 AM
Unknown Object (File)
Dec 20 2022, 8:28 PM
Unknown Object (File)
Nov 24 2022, 2:49 AM
Unknown Object (File)
Nov 17 2022, 10:41 PM
Unknown Object (File)
Nov 17 2022, 10:41 PM
Unknown Object (File)
Nov 17 2022, 10:40 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.