grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Grammatica-users] regular expression problem in tokens


From: Per Cederberg
Subject: Re: [Grammatica-users] regular expression problem in tokens
Date: Mon, 18 May 2009 08:04:28 +0200

Yes, this looks like a bug in the new DFA regexp implementation. I'll
look into it in a few days when I have more time.

Thanks for reporting it!

/Per

On Mon, May 18, 2009 at 00:54, Wieger Wesselink <address@hidden> wrote:
> Hi,
>
> when I put the regular expression '\d+(-\d+)+' in a token I would
> expect that the string '1-23' is accepted. However, I get the following
> error:
>
> Parse tree from 1.pdn:
> Error: in 1.pdn: line 1:
>      unexpected character '1'
>
> 1-23
> ^
>
> I have verified on http://www.fileformat.info/tool/regex.htm that
> the string '1-23' matches with '\d+(-\d+)+'.
>
> Is this a bug in Grammatica, or am I doing something wrong? For the
> full grammar see below.
>
> Best regards,
>
> Wieger
>
> -----------------------------
>
> %header%
>
> GRAMMARTYPE = "LL"
>
> %tokens%
>
> NUMBERS    = <<\d+(-\d+)+>>
> WHITESPACE = <<[ \t\n\r]+>> %ignore%
>
> %productions%
>
> Start = NUMBERS ;
>
>
>
> --
> _______________________________________________
> Surf the Web in a faster, safer and easier way:
> Download Opera 9 at http://www.opera.com
>
> Powered by Outblaze
>
>
> _______________________________________________
> Grammatica-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]