Homec4science

Modularize parser for "Closes task X as Y"

Authored by epriestley <git@epriestley.com> on Feb 18 2014, 00:53.

Description

Modularize parser for "Closes task X as Y"

Summary:
Ref T3886. Ref T3872. Ref T1812. We have several parsers which look for textual references to other objects, like:

Closes Tx.
Depends on Dy.
Reverts Dz.

Currently, these are pretty hard coded, don't get all the edge cases right, and don't generalize well. They're also implemented in the middle of Differential's field code. So I want to:

  • Share more code so that, e.g., "Tx, Ty" always works (only some rules support it right now);
  • fix bugs in the parser, like T3872;
  • make this a modular, extensible process which runs against custom fields, not a builtin part of fields;
  • make the internals more flexible to accommodate custom stuff like T1812.

This implements the "Verbs optional-noun Object, Optional Other Objects optional-as-something." grammar in a general way so subclasses can just plug in their keywords. Runtime code doesn't touch this yet.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3872, T1812, T3886

Differential Revision: https://secure.phabricator.com/D8261

Details

Committed
epriestley <git@epriestley.com>Feb 18 2014, 00:53
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7ff539b72948: Fix a bad call in ElasticSearch recovery code
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd016cac91513: Modularize parser for "Closes task X as Y" (authored by epriestley <git@epriestley.com>).Feb 18 2014, 00:53