Skip Menu |
 

This queue is for tickets about the Regexp-Grammars CPAN distribution.

Report information
The Basics
Id: 69249
Status: open
Priority: 0/
Queue: Regexp-Grammars

People
Owner: Nobody in particular
Requestors: XLAT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From famille.georges [...] gmail.com Sat Jul 2 14: 44:10 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-5.127 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_FONT_FACE_BAD=0.981, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RFC_ABUSE_POST=0.001, SPF_NEUTRAL=0.779, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
X-Spam-Flag: NO
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Type: multipart/alternative; boundary=0016e6dbe65c8f16be04a71a845d
Message-ID: <CAPwsxFiqeOWqZduTKsY2-aiWqCb+X23F=dtc48JOSeZ7U_TJNQ [...] mail.gmail.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -5.127
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 65F83240452 for <cpan-bug+regexp-grammars [...] hipster.bestpractical.com>; Sat, 2 Jul 2011 14:44:10 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dFZVI8QEHjex for <cpan-bug+regexp-grammars [...] hipster.bestpractical.com>; Sat, 2 Jul 2011 14:44:09 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C1E8024035A for <bug-regexp-grammars [...] rt.cpan.org>; Sat, 2 Jul 2011 14:44:08 -0400 (EDT)
Received: (qmail 11344 invoked by uid 103); 2 Jul 2011 18:44:07 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 2 Jul 2011 18:44:07 -0000
Received: from mail-bw0-f50.google.com (HELO mail-bw0-f50.google.com) (209.85.214.50) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Sat, 02 Jul 2011 11:44:05 -0700
Received: by bwb11 with SMTP id 11so3389773bwb.9 for <bug-regexp-grammars [...] rt.cpan.org>; Sat, 02 Jul 2011 11:44:01 -0700 (PDT)
Received: by 10.204.84.6 with SMTP id h6mr4225782bkl.188.1309632241800; Sat, 02 Jul 2011 11:44:01 -0700 (PDT)
Received: by 10.205.81.13 with HTTP; Sat, 2 Jul 2011 11:44:01 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+regexp-grammars [...] hipster.bestpractical.com
Subject: better/prettier error handling
Return-Path: <famille.georges [...] gmail.com>
X-RT-Mail-Extension: regexp-grammars
X-Original-To: cpan-bug+regexp-grammars [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=rFEl65soRxJOjLtdORjpe2luyGND8TbIarknFeRLJYI=; b=LzEf6TpYro+4qLRJxLd99vUuoGUbsgXyJVb9gWCiDkOyb1oIWBiaeb3pHyaX2yg8Go QjK7jpjG7qUvuB0XCQPpZvHX9k/KXyPdwyEe8GBtaKEdX0pnYItn5hB+3i0Ky4wr5WiD Le2oxrPiAykj5Rs5wLZGLM4aCh8xKDR8YY4ak=
X-Google-Sender-Auth: sOKuWKlRpADq2EGAENZowXRQRQs
Sender: famille.georges [...] gmail.com
Date: Sat, 2 Jul 2011 20:44:01 +0200
X-Spam-Level:
To: bug-regexp-grammars [...] rt.cpan.org
From: "Nicolas GEORGES (CPAN)" <xlat [...] cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 681
Download (untitled) / with headers
text/plain 681b
For exemple, when running the following: C:\perl510\geni\Regexp-Grammars-1.013\demo>perl demo_error.pl 1+2-5x5 Extra junk after expression at index 1: '+2-5x5' Expected end of input, but found '+2-5x5' instead Expected valid input, but found '+2-5x5' instead Expected literal, but found '1+2-5x5' instead Expected valid arithmetic expression, but found '1+2-5x5' instead I would like to produce a message like : Extra junk after expression at index 5: 'x5' or 1+2-5x5 .....^__ Expected valid arithmetic expression May be I miss something like <commit> that is available in Parse::RecDescent ? In which case I could insert it at the right place in the grammar. TIA, Nicolas.
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 3130
From thoughtstream [...] gmail.com Sun Jul 3 19: 37:33 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.724 tagged_above=-99.9 required=10 tests=[AWL=-0.615, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RFC_ABUSE_POST=0.001, SPF_NEUTRAL=0.779, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-9061-1309632251-1116.69249-4-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-69249 [...] rt.cpan.org> <CAPwsxFiqeOWqZduTKsY2-aiWqCb+X23F=dtc48JOSeZ7U_TJNQ [...] mail.gmail.com> <rt-3.8.HEAD-9061-1309632251-1116.69249-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <CAATtAp4z1TNQUGT_s-_9wbP-yy4c95LxPOaimU5E29f1VrUdmA [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.724
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id F18F724035F for <cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com>; Sun, 3 Jul 2011 19:37:32 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AUOr-c8Ke9c6 for <cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com>; Sun, 3 Jul 2011 19:37:31 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5AF15240446 for <bug-Regexp-Grammars [...] rt.cpan.org>; Sun, 3 Jul 2011 19:37:31 -0400 (EDT)
Received: (qmail 28817 invoked by uid 103); 3 Jul 2011 23:37:30 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 3 Jul 2011 23:37:30 -0000
Received: from mail-iw0-f178.google.com (HELO mail-iw0-f178.google.com) (209.85.214.178) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Sun, 03 Jul 2011 16:37:28 -0700
Received: by iwc10 with SMTP id 10so4623676iwc.9 for <bug-Regexp-Grammars [...] rt.cpan.org>; Sun, 03 Jul 2011 16:37:26 -0700 (PDT)
Received: by 10.42.155.10 with SMTP id s10mr6390243icw.54.1309736246065; Sun, 03 Jul 2011 16:37:26 -0700 (PDT)
Received: by 10.42.96.3 with HTTP; Sun, 3 Jul 2011 16:36:46 -0700 (PDT)
Delivered-To: cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #69249] better/prettier error handling
Return-Path: <thoughtstream [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=IVjWbG+aMbSLW7m0H1t/M6HZRIB56mFNziIQKBnGWdI=; b=H2s2blLFKG9J5mYe59cJu2QD/pgcTW9atANfmFsp0R9el5WQfdbOdx4tNbwfP5CZNJ 8ut5nPvHFGRy6/EU2fhabyrmsOX3j4VozMSJlHTbpCoVYzXTEq98LvnzNQgQDOqNGgvA U4gx7WtwWgA8DSEnmdZEHQ+AocNTZGDStMH+E=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Regexp-Grammars [...] hipster.bestpractical.com
X-RT-Mail-Extension: regexp-grammars
X-Google-Sender-Auth: FOs9R6R1DsrZnUjZcZp85fwR0xE
Sender: thoughtstream [...] gmail.com
Date: Mon, 4 Jul 2011 09:36:46 +1000
X-Spam-Level:
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
RT-Message-ID: <rt-3.8.HEAD-9063-1309736253-739.69249-0-0 [...] rt.cpan.org>
Content-Length: 513
Download (untitled) / with headers
text/plain 513b
Hi Nicolas, You asked: Show quoted text
> May be I miss something like <commit> that is available in Parse::RecDescent? > In which case I could insert it at the right place in the grammar.
That's exactly right. Regexp::Grammars doesn't provide a <commit>, because it doesn't need to: Perl itself does (in 5.10 and later, at least). You should get the behaviour you want by changing the lines: \A <Answer> to \A <Answer> (*COMMIT) You can read about (*COMMIT) in the perlre manpage. All the best, Damian


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.