grammarPEG : Grammar <- Definition+ !. what is the !.

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

grammarPEG : Grammar <- Definition+ !. what is the !.

Squeak - Dev mailing list
In XTreams-Parsing ->PEGParser class->grammarPEG

is a Rule 

Grammar <- Definition+ !.


Which I believe means "Only 1 or more definitions and nothing else"  where "!." means "nothing else"

I suspect that the !. was put there to radically tighten down the allowed inputs to a PEG grammar.

Is this assumption correct?


thanks in advance.

tty





Reply | Threaded
Open this post in threaded view
|

Re: grammarPEG : Grammar <- Definition+ !. what is the !.

Levente Uzonyi
Hi Tim,

On Thu, 16 Apr 2020, gettimothy via Squeak-dev wrote:

> In XTreams-Parsing ->PEGParser class->grammarPEG
>
> is a Rule 
>
>       Grammar <- Definition+ !.
>
>
>
> Which I believe means "Only 1 or more definitions and nothing else"  where "!." means "nothing else"
>
> I suspect that the !. was put there to radically tighten down the allowed inputs to a PEG grammar.
>
> Is this assumption correct?
IIRC '!.' means end of stream. $! is simple negation. $. is any character.


Levente

>
>
> thanks in advance.
>
> tty
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: grammarPEG : Grammar <- Definition+ !. what is the !.

Chris Cunnington-4
In reply to this post by Squeak - Dev mailing list


On Apr 16, 2020, at 9:43 AM, gettimothy via Squeak-dev <[hidden email]> wrote:

Grammar <- Definition+ !.


I think this is just the root definition of the tree after the mandatory Grammar definition. You are allowed one or more further definitions, which is what the + is for. The !. just says nothing else will be processed. To me it almost looks like the root as a no-op, because it just passes on to wherever Definition is defined. 

Chris 

Screaming Trees - Nearly Lost You 


Reply | Threaded
Open this post in threaded view
|

How May We Assist?

Renters Cancellation Requests

Dear Valued Customer,


Thank you for your inquiry. Please let us know how we may assist you.


If you have a Renter’s policy, you can manage your policy online 24/7 at: https://www.myassurantpolicy.com/

You have access to a range of service options including:

  • View/update policy information
  • Manage your payments
  • Obtain proof of insurance
  • And much more


Thank you for allowing us the opportunity to serve you.


Sincerely,

Insurance Services

Assurant - Global Specialty Operations 





------------------- Original Message -------------------
From: Chris Cunnington
Received: Thu Apr 16 2020 13:06:21 GMT-0400 (Eastern Daylight Time)
To: gettimothy via Squeak-dev; tty
Subject: Re: [squeak-dev] grammarPEG : Grammar <- Definition+ !. what is the !.




On Apr 16, 2020, at 9:43 AM, gettimothy via Squeak-dev <[hidden email]> wrote:

Grammar <- Definition+ !.


I think this is just the root definition of the tree after the mandatory Grammar definition. You are allowed one or more further definitions, which is what the + is for. The !. just says nothing else will be processed. To me it almost looks like the root as a no-op, because it just passes on to wherever Definition is defined. 

Chris 

Screaming Trees - Nearly Lost You 

This e-mail message and all attachments transmitted with it may contain legally privileged and/or confidential information intended solely for the use of the addressee(s). If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, forwarding or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message and all copies and backups thereof. Thank you.



ATT00001.txt (6 bytes) Download Attachment