grammatica-users
[Top][All Lists]
Advanced

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

[Grammatica-users] regular expression problem in tokens


From: Wieger Wesselink
Subject: [Grammatica-users] regular expression problem in tokens
Date: Sun, 17 May 2009 23:54:12 +0100

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




reply via email to

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