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

parser module validation failure #37862

Closed
logistix mannequin opened this issue Jan 29, 2003 · 6 comments
Closed

parser module validation failure #37862

logistix mannequin opened this issue Jan 29, 2003 · 6 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@logistix
Copy link
Mannequin

logistix mannequin commented Jan 29, 2003

BPO 676521
Nosy @mwhudson
Files
  • parser-fixes.diff: mwh's fixes
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mwhudson'
    closed_at = <Date 2003-01-29.23:11:18.000>
    created_at = <Date 2003-01-29.02:28:43.000>
    labels = ['interpreter-core']
    title = 'parser module validation failure'
    updated_at = <Date 2003-01-29.23:11:18.000>
    user = 'https://bugs.python.org/logistix'

    bugs.python.org fields:

    activity = <Date 2003-01-29.23:11:18.000>
    actor = 'logistix'
    assignee = 'mwh'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2003-01-29.02:28:43.000>
    creator = 'logistix'
    dependencies = []
    files = ['768']
    hgrepos = []
    issue_num = 676521
    keywords = []
    message_count = 6.0
    messages = ['14298', '14299', '14300', '14301', '14302', '14303']
    nosy_count = 3.0
    nosy_names = ['mwh', 'nnorwitz', 'logistix']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue676521'
    versions = ['Python 2.3']

    @logistix
    Copy link
    Mannequin Author

    logistix mannequin commented Jan 29, 2003

    C:\>c:\python23\python
    Python 2.3a1 (#38, Dec 31 2002, 17:53:59) [MSC 
    v.1200 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more 
    information.
    >>> import parser
    >>> a = file('c:\\python23\\lib\\base64.py').read()
    >>> b = parser.suite(a)
    >>> c = parser.ast2tuple(b)
    >>> d = parser.sequence2ast(c)
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
    parser.ParserError: VALIDATION FAILURE: report this 
    to the maintainer!
    >>> ^Z

    C:\>

    Problem also occurred on Python 2.2.2 on WinXP and
    RedHat 7.3

    @logistix logistix mannequin closed this as completed Jan 29, 2003
    @logistix logistix mannequin assigned mwhudson Jan 29, 2003
    @logistix logistix mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 29, 2003
    @logistix logistix mannequin closed this as completed Jan 29, 2003
    @logistix logistix mannequin assigned mwhudson Jan 29, 2003
    @logistix logistix mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Jan 29, 2003
    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Jan 29, 2003

    Logged In: YES
    user_id=33168

    The problem is floor division // on the line:

      MAXBINSIZE = (MAXLINESIZE//4)*3

    @mwhudson
    Copy link

    Logged In: YES
    user_id=6656

    So the attached would be the fix, then?

    I feel a "How to change Python's grammar" informational PEP
    coming on...

    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Jan 29, 2003

    Logged In: YES
    user_id=33168

    I'm not familiar with the parser module (this is the first
    time I've looked at it). But the patch looks correct.

    As for the PEP, I think it's a good idea. It would help
    point out many details people (like me) are probably unaware of.

    @mwhudson
    Copy link

    Logged In: YES
    user_id=6656

    Checked in as:

    Modules/parsermodule.c revision 2.75
    Lib/test/test_parser.py 1.14

    logistix, can you check this works for you?

    PEP already with editors. It wasn't very long, as it turned
    out.

    @logistix
    Copy link
    Mannequin Author

    logistix mannequin commented Jan 29, 2003

    Logged In: YES
    user_id=699438

    Yeah, works fine. Thanks for the prompt action.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant