Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Text::Parser method: add_rule #37

Closed
4 tasks done
balajirama opened this issue Jun 10, 2019 · 0 comments
Closed
4 tasks done

New Text::Parser method: add_rule #37

balajirama opened this issue Jun 10, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@balajirama
Copy link
Owner

balajirama commented Jun 10, 2019

  • Create a new method called add_rule that would take a hash as input

  • First turn on auto_split

  • The method should create a new rule and save it.

  • Run the rules saved when calling save_record

@balajirama balajirama self-assigned this Jun 10, 2019
@balajirama balajirama added this to To do in Rules-based parsing - Extended AWK syntax via automation Jun 10, 2019
@balajirama balajirama added the enhancement New feature or request label Jun 10, 2019
Rules-based parsing - Extended AWK syntax automation moved this from To do to Done Jun 11, 2019
balajirama added a commit that referenced this issue Jun 17, 2019
  - Changed the primary usage model from inheritance-based to regular use in main.
  - A new class for text parsing rules created Text::Parser::Rule (#17).
  - Import functions from String::Util, Scalar::Util, String::Util::Match, String::Util::Range, and String::Index.
    These can be accessed inside the ExAWK string rules directly (#44)
  - Added new methods to Text::Parser called add_rule to create rules (#37), and clear_rules to delete rules (#40)
  - Added new methods to Text::Parser called BEGIN_rule and END_rule (#47). The current line is not accessible in this rule.
  - Added new method join_range available when auto_split => 1 (#38)
  - Rules support range shortcuts like ${3+}, @{2+}, and \@{3+} (#39), (#45)
  - Added ability to create parse-time variables accessible across rules such as ~var (#48)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

1 participant