librelist archives

« back to archive

: Exclusion clause

: Exclusion clause

From:
n3rdz0rz
Date:
2011-11-22 @ 14:11
Hi there !
> 
> I am currently programming a parser using Parslet, but I am actually 
facing a huge problem.
> 
> I posted it @ stackoverflow : 
http://stackoverflow.com/questions/8223830/parslet-exclusion-clause
> 
> If you could take a look, it would be great..
> 
> Best regards,
> 
> 
> n3rdz0rz

Re: : Exclusion clause

From:
Kaspar Schiess
Date:
2011-11-23 @ 08:50
>> I posted it @ stackoverflow : 
http://stackoverflow.com/questions/8223830/parslet-exclusion-clause

Please, next time post the question here, so that when I answer, it 
benefits the world, not just you. I am not sure at all whether we can 
repeat any of the discussion here without violating the terms of use of 
stackoverflow.

k

Re: [ruby.parslet] Re: : Exclusion clause

From:
Nigel Thorne
Date:
2011-11-23 @ 09:18
Everything on Stack Overflow is on a creative commons licence. So you
should be fine.

This is of-course your list, and the result of all your hard work,(which I
deeply appreciate) so what you say goes.. but it's worth considering
supporting Stack Overflow.

Given how well they rank in Google answers to existing questions are very
easy to find on there, and hence share with the world. The site is
structured such that once you've answered a question once, it's easy to
find.

Not only does it share with the world.. It's also a nice way to let the
people, that help you answer questions, get some recognition for their
community spirited efforts in a wider community (in the form of the points
they ecru).

It's fast become my favorite way of providing support and asking questions
no matter how niche.

I think discussions on Parslet internals or your goals for the future of
Parslet would still be great content for this list. But.. How do I do X?
questions could fit really well on stack overflow.

The other nice thing about the way the site is structured.. people not only
answer the questions, but help refine and clarify them and keep the
information current (as all these activities have recognition attached)

Anyway.. advert over.

Thanks again for Parslet,.. I have yet to use it in anger, but I have
dabbled enough that I view it as a hammer in my toolbox, and more and more
these days problems I'm solving are looking like nails :)

Regards,
Nigel Thorne


On 23 November 2011 19:50, Kaspar Schiess <eule@space.ch> wrote:

> >> I posted it @ stackoverflow :
> http://stackoverflow.com/questions/8223830/parslet-exclusion-clause
>
> Please, next time post the question here, so that when I answer, it
> benefits the world, not just you. I am not sure at all whether we can
> repeat any of the discussion here without violating the terms of use of
> stackoverflow.
>
> k
>
>

Re: [ruby.parslet] Re: : Exclusion clause

From:
Kaspar Schiess
Date:
2011-11-23 @ 09:31
> I think discussions on Parslet internals or your goals for the future of
> Parslet would still be great content for this list. But.. How do I do X?
> questions could fit really well on stack overflow.

I think so too. Its just that if you post to this list, you should post 
the question, so I can give you an answer without depending on 
stackoverflow. Who knows what'll happen in the future - discussions that 
live partly there and partly here will probably be broken because either 
end disappears. 

This is the citation problem science faces as well; not any quabble I have
with stackoverflow. For all I know, stackoverflow is the newcomer and 
gmane.org (and mailing lists) exist for as long as I can thinkā€¦

You can always end with a "PS: this is also on stackoverflow LINK" if you 
want to. 

regards, 
kaspar

Re: [ruby.parslet] Re: : Exclusion clause

From:
Olivier Debant
Date:
2011-11-23 @ 14:38
Hi,

I hesitated to post it on StackOverflow after asking you, because it would
mean that at least 1 people would have cared about my problem for nothing.
Sorry for that. I think Parslet is pretty awesome, and even if this list
allow us to have 'fast answers' (well, you answered me in less thant 1
day), StackOverflow would be a great way to make it famous (by the way,
someone with more than 1250 reputation point could create a special tag for
Parslet). My school is currently working with it (they are currently
creating a VHDL parser, the source-code of which will be, of course,
totally open), just because they found Treetop and Citrus too
"ruby-unlike", and they might have some questions I guess, I'll tell them
to suscribe to the list.

I'll profit in this mail to ask you a parsing question. I'm trying to write
a rule, saying "this can be every character, except # and \".

In Ruby, I would do that :

I tried that : match('[^#\\]'), but it doesn't seem to work (premature end
of regular expression)

Did I make a mistake on this one ?


Have a nice day !

Regards,

Olivier

Re: [ruby.parslet] Re: : Exclusion clause

From:
Kaspar Schiess
Date:
2011-11-23 @ 15:14
Hei Olivier, 

> and they might have some questions I guess, I'll tell them
> to suscribe to the list.

Or to use an NNTP reader and point it to gmane.org.. i.e. Thunderbird.

> I'll profit in this mail to ask you a parsing question. I'm trying to write
> a rule, saying "this can be every character, except # and \".

Two ways to go about this: 

- match['^#\\\\'] (I know, this is horrible)
- (str('#') | str('\\')).absent? >> any

PS: What school? ;) 

greetings, 
kaspar

Re: [ruby.parslet] Re: : Exclusion clause

From:
Olivier Debant
Date:
2011-11-23 @ 15:47
Ok I'll tell them about that. And thanks for your answer !

As for the school, the name is ENSTA Bretagne (former ENSIETA), a famous
french post-graduate engineering school, specialized in several domains
like hydrography, pyrotechnics, computer-science (mostly software
engineering and robotics), etc. Here is the link :
http://www.ensta-bretagne.fr/en/.


Regards,


Olivier.