This is an archive of the discontinued LLVM Phabricator instance.

[FileCheck] doc update/fix
ClosedPublic

Authored by SjoerdMeijer on Oct 11 2017, 1:49 AM.

Details

Summary

This adds to the documentation that the matcher supports/implements POSIX BRE and ERE.
It also fixes a minor issue in the regexp describing a variable name: underscores are allowed too.

Diff Detail

Repository
rL LLVM

Event Timeline

SjoerdMeijer created this revision.Oct 11 2017, 1:49 AM
SjoerdMeijer retitled this revision from [arm-llvm-patches] [FileCheck] doc update/fix to [FileCheck] doc update/fix.Oct 11 2017, 1:51 AM

I would like to add links for BRE and ERE, to get a quick syntax overview. Not sure what page would be best for that, and if we e.g. can or like to link to wikipedia (https://en.wikipedia.org/wiki/Regular_expression#POSIX_basic_and_extended) or something else.

bkramer edited edge metadata.Oct 11 2017, 3:23 PM

Does FileCheck actually support BRE? I thought it's always ERE.

Thanks for reviewing/checking. The regexp class implements both BRE and ERE, but it defaults to using ERE. Thus FileCheck defaults to ERE. As the mode is not exposed to the user (with e.g. an option), I kept it simple and now say that FileCheck supports ERE.

This revision is now accepted and ready to land.Oct 12 2017, 8:43 AM
This revision was automatically updated to reflect the committed changes.