AW: Grammatica-users Digest, Vol 55, Issue 2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

AW: Grammatica-users Digest, Vol 55, Issue 2

Schilha, Matthias
Hi Per,

I found the solution: In one project I have the grammar and the generated files. In another project I use the grammar. In my opinion VS updated the dlls incorrectly.

At the end it works and I am happy.

Cheers
Matthias

-----Ursprüngliche Nachricht-----
Von: grammatica-users-bounces+matthias.schilha=[hidden email] [mailto:grammatica-users-bounces+matthias.schilha=[hidden email]] Im Auftrag von [hidden email]
Gesendet: Donnerstag, 24. März 2011 17:01
An: [hidden email]
Betreff: Grammatica-users Digest, Vol 55, Issue 2

Send Grammatica-users mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.nongnu.org/mailman/listinfo/grammatica-users
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Grammatica-users digest..."


Today's Topics:

   1. Re: Grammar with single-quoted stings (Per Cederberg)


----------------------------------------------------------------------

Message: 1
Date: Wed, 23 Mar 2011 18:52:58 +0100
From: Per Cederberg <[hidden email]>
Subject: Re: [Grammatica-users] Grammar with single-quoted stings
To: "[hidden email]" <[hidden email]>
Message-ID:
        <AANLkTi=RgObC=[hidden email]>
Content-Type: text/plain; charset=UTF-8

Your regex for whitespace seems to include an accidental extra char at the end.

Cheers,

/Per

On Wednesday, March 23, 2011, Schilha, Matthias <[hidden email]> wrote:

> Hi,
>
> i want to write a grammar to accept strings like this: a = 'b'
>
> To do that, I write this grammar:
>
> %header%
>
> GRAMMARTYPE = "LL"
>
> %tokens%
>
> EQ                                                       = "="
>
> S_QUOTE                                          = "'"
>
> NUMBER                       = <<[0-9]+>> IDENTIFIER    
>               = <<'[A-Za-z§][A-Za-z0-9_§]*>> WHITESPACE    
>               = <<[ \t\n\r]+'>> %ignore%
>
>
> %productions%
>
>
> Expression = IDENTIFIER AtomComparisonTail;
>
> AtomComparisonTail = Comparison Atom
>  Â               | Comparison "'" Atom "'";
>
> Comparison = "=";
>
> Atom = NUMBER
>  Â    | IDENTIFIER;
>
>
> But it doesn't work. I get the message: unexpected character ''', on
> line: 1 column: 3
>
> In this way I changed my grammar to
>
> %header%
>
> GRAMMARTYPE = "LL"
>
> %tokens%
>
> EQ                                                       = "="
>
> S_QUOTE                                          = "'"
>
> QUOTED_STRING                = <<('[^']*')>> NUMBER        
>               = <<[0-9]+>> IDENTIFIER                  
> = <<'[A-Za-z§][A-Za-z0-9_§]*>> WHITESPACE                  
> = <<[ \t\n\r]+'>> %ignore%
>
>
> %productions%
>
>
> Expression = IDENTIFIER AtomComparisonTail;
>
> AtomComparisonTail = Comparison Atom
>  Â               | Comparison QUOTED_STRING Atom QUOTED_STRING;
>
> Comparison = "=";
>
> Atom = NUMBER
>  Â    | IDENTIFIER;
>
> But it is still not working.
>
> Have someone another idea to solve this problem.
>
> Thank you very much.
> Matthias
>
> _______________________________________________
> Grammatica-users mailing list
> [hidden email]
> http://lists.nongnu.org/mailman/listinfo/grammatica-users
>

------------------------------

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users


End of Grammatica-users Digest, Vol 55, Issue 2
***********************************************

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users