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

Meaningful repr for ParserElements #423

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Commits on Jul 1, 2022

  1. Configuration menu
    Copy the full SHA
    02a176c View commit details
    Browse the repository at this point in the history
  2. Meaningful repr for ParserElements

    A couple of notes:
     - Populated instances of Forward are represented only as "Forward(...)"
       to prevent infinite recursion.
     - Helper classes like _PendingSkip and _ErrorStop are not yet handled.
    djpohly committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    93f2271 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2022

  1. Configuration menu
    Copy the full SHA
    81605f7 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2022

  1. Configuration menu
    Copy the full SHA
    fa6615c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    47353af View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2022

  1. Configuration menu
    Copy the full SHA
    b847d33 View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2022

  1. ParserElement repr() implementation, with literals

    Introduces a _make_repr() method with parameters to account for the
    different contexts in which an element may need to be represented (top
    level or as a term in an expression, as a potential string literal or
    not).  In order to make the code a little easier to read, the
    __format__() method is implemented as well, with conversion specifiers
    used to indicate the context.
    djpohly committed Jul 7, 2022
    Configuration menu
    Copy the full SHA
    e2b8a34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5735734 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2022

  1. Configuration menu
    Copy the full SHA
    1796bdc View commit details
    Browse the repository at this point in the history
  2. abbrev_charset() function for repr of charsets

    This function determines how to represent a set of characters using
    srange(), then returns either the original set or the srange expression,
    whichever is shorter.  To be used in repr() implementations in elements,
    such as Word, which are based on sets of characters.
    djpohly committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    598fe10 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4065f60 View commit details
    Browse the repository at this point in the history