Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

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

Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Hi,

I'm trying to port SmaCC to 2.0 and I'm looking for the equivalent to
SystemChangeNotifier>>doSilently:. Is it SystemAnnouncer>>suspendAllWhile:?

(doSilently: is used in SmaCC tests).

Thanks,

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

EstebanLM
yep :)

On Mar 8, 2013, at 4:52 PM, Goubier Thierry <[hidden email]> wrote:

> Hi,
>
> I'm trying to port SmaCC to 2.0 and I'm looking for the equivalent to SystemChangeNotifier>>doSilently:. Is it SystemAnnouncer>>suspendAllWhile:?
>
> (doSilently: is used in SmaCC tests).
>
> Thanks,
>
> Thierry
> --
> Thierry Goubier
> CEA list
> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> 91191 Gif sur Yvette Cedex
> France
> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>


Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Le 08/03/2013 16:55, Esteban Lorenzano a écrit :
> yep :)

Thanks,

Thierry

> On Mar 8, 2013, at 4:52 PM, Goubier Thierry <[hidden email]> wrote:
>
>> Hi,
>>
>> I'm trying to port SmaCC to 2.0 and I'm looking for the equivalent to SystemChangeNotifier>>doSilently:. Is it SystemAnnouncer>>suspendAllWhile:?
>>
>> (doSilently: is used in SmaCC tests).
>>
>> Thanks,
>>
>> Thierry
>> --
>> Thierry Goubier
>> CEA list
>> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
>> 91191 Gif sur Yvette Cedex
>> France
>> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>>
>
>
>
>


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Mariano Martinez Peck
In reply to this post by Goubier Thierry


On Fri, Mar 8, 2013 at 12:52 PM, Goubier Thierry <[hidden email]> wrote:
Hi,

I'm trying to port SmaCC to 2.0 and I'm looking for the equivalent to SystemChangeNotifier>>doSilently:. Is it SystemAnnouncer>>suspendAllWhile:?

(doSilently: is used in SmaCC tests).


There is also a nice #valueWithoutNotifications  in BlockClosure.

BTW, does it make sense to port SmaCC? 
Which use case do you have in which you prefer SmaCC over say PetitParse?
I took a look few weeks ago to something done in SmaCC and it was full of ugly unmaintainable class side tables.....
 
Thanks,

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95




--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Le 08/03/2013 16:58, Mariano Martinez Peck a écrit :

>
>
> On Fri, Mar 8, 2013 at 12:52 PM, Goubier Thierry <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I'm trying to port SmaCC to 2.0 and I'm looking for the equivalent
>     to SystemChangeNotifier>>__doSilently:. Is it
>     SystemAnnouncer>>__suspendAllWhile:?
>
>     (doSilently: is used in SmaCC tests).
>
>
> There is also a nice #valueWithoutNotifications  in BlockClosure.
>
> BTW, does it make sense to port SmaCC?
> Which use case do you have in which you prefer SmaCC over say PetitParse?
> I took a look few weeks ago to something done in SmaCC and it was full
> of ugly unmaintainable class side tables.....

If you are OK with grammars as a way to clearly specify a syntax, and
you don't have too much context in it, a LALR parser as SmaCC is hard to
beat (fairly short to write, and to maintain *IF* you use SmaCC-Dev).
Moreover, SmaCC lexers being entirely compiled in Smalltalk (i.e. not a
simulation of an automaton but direct compilation of the minimized DFA),
it's hard to be any faster.

And never, never touch the tables by hand. They are all generated ! The
only thing you need to understand a SmaCC generated parser and scanner
are the comments class-side.

For the kind of parsing I do, I need SmaCC. I don't know yet if
PetitParser can take the load.

Thierry

>     Thanks,
>
>     Thierry
>     --
>     Thierry Goubier
>     CEA list
>     Laboratoire des Fondations des Systèmes Temps Réel Embarqués
>     91191 Gif sur Yvette Cedex
>     France
>     Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com


--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

stephane ducasse
In reply to this post by Mariano Martinez Peck

Hi,

I'm trying to port SmaCC to 2.0

Cool can you publish it in PharoExtras?
I would like to have it there + a wonderful set of tests automatically triggered on a nice integration server :)


and I'm looking for the equivalent to SystemChangeNotifier>>doSilently:. Is it SystemAnnouncer>>suspendAllWhile:?

(doSilently: is used in SmaCC tests).


There is also a nice #valueWithoutNotifications  in BlockClosure.

BTW, does it make sense to port SmaCC? 

faster 
more compact 
Which use case do you have in which you prefer SmaCC over say PetitParse?
I took a look few weeks ago to something done in SmaCC and it was full of ugly unmaintainable class side tables…..

you do not have to read the assembly code of your Smalltalk programs. :)

Smacc represents the traditional way to build parser and it is important to also have it around and kicking.

Stef
Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Le 08/03/2013 22:17, stephane ducasse a écrit :
>>
>>     Hi,
>>
>>     I'm trying to port SmaCC to 2.0
>
> Cool can you publish it in PharoExtras?
> I would like to have it there + a wonderful set of tests automatically
> triggered on a nice integration server :)

I can.

I'll try to make sure I test it with a larger set of tests next, but, so
far, the only change I had to do was that doSilently: thing.

Now, would anyone has a nice configuration showing how to customize for
Pharo 2.0/Pharo 1.4 ?

>
>>     and I'm looking for the equivalent to
>>     SystemChangeNotifier>>__doSilently:. Is it
>>     SystemAnnouncer>>__suspendAllWhile:?
>>
>>     (doSilently: is used in SmaCC tests).
>>
>>
>> There is also a nice #valueWithoutNotifications  in BlockClosure.
>>
>> BTW, does it make sense to port SmaCC?
>
> faster
> more compact
>> Which use case do you have in which you prefer SmaCC over say PetitParse?
>> I took a look few weeks ago to something done in SmaCC and it was full
>> of ugly unmaintainable class side tables…..
>
> you do not have to read the assembly code of your Smalltalk programs. :)
>
> Smacc represents the traditional way to build parser and it is important
> to also have it around and kicking.

It could be nice to upgrade Pharo's SmaCC to the GLR parsing which
exists in SmaCC for VW and Dolphin.

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

stephane ducasse
>
> I can.
>
> I'll try to make sure I test it with a larger set of tests next, but, so far, the only change I had to do was that doSilently: thing.
>
> Now, would anyone has a nice configuration showing how to customize for Pharo 2.0/Pharo 1.4 ?


The idea is that you have your baseline and version
then you add symbolic version

stable: spec
        <symbolicVersion: #'stable'>

        spec for: #'common' version: '1.1'.
        spec for: #'pharo1.4.x' version: '1.4'
        spec for: #'pharo2.0.x' version: '1.8'

Have a look at the metacello chapter

>>>    and I'm looking for the equivalent to
>>>    SystemChangeNotifier>>__doSilently:. Is it
>>>    SystemAnnouncer>>__suspendAllWhile:?
>>>
>>>    (doSilently: is used in SmaCC tests).
>>>
>>>
>>> There is also a nice #valueWithoutNotifications  in BlockClosure.
>>>
>>> BTW, does it make sense to port SmaCC?
>>
>> faster
>> more compact
>>> Which use case do you have in which you prefer SmaCC over say PetitParse?
>>> I took a look few weeks ago to something done in SmaCC and it was full
>>> of ugly unmaintainable class side tables…..
>>
>> you do not have to read the assembly code of your Smalltalk programs. :)
>>
>> Smacc represents the traditional way to build parser and it is important
>> to also have it around and kicking.
>
> It could be nice to upgrade Pharo's SmaCC to the GLR parsing which exists in SmaCC for VW and Dolphin.

Yes!
Definitively.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Le 11/03/2013 11:09, stephane ducasse a écrit :

>>
>> I can.
>>
>> I'll try to make sure I test it with a larger set of tests next, but, so far, the only change I had to do was that doSilently: thing.
>>
>> Now, would anyone has a nice configuration showing how to customize for Pharo 2.0/Pharo 1.4 ?
>
>
> The idea is that you have your baseline and version
> then you add symbolic version
>
> stable: spec
> <symbolicVersion: #'stable'>
>
> spec for: #'common' version: '1.1'.
> spec for: #'pharo1.4.x' version: '1.4'
> spec for: #'pharo2.0.x' version: '1.8'
>
> Have a look at the metacello chapter

Done, but then I had a segfault (#becomeForward:)... well in fact two,
trying to load SmaCCDev and OSProcess. Will try to recover my changes soon.

Kind of hard at the moment to use Pharo 2.0, with the segfaults.

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

stephane ducasse
>>
>> then you add symbolic version
>>
>> stable: spec
>> <symbolicVersion: #'stable'>
>>
>> spec for: #'common' version: '1.1'.
>> spec for: #'pharo1.4.x' version: '1.4'
>> spec for: #'pharo2.0.x' version: '1.8'
>>
>> Have a look at the metacello chapter
>
> Done, but then I had a segfault (#becomeForward:)... well in fact two, trying to load SmaCCDev and OSProcess. Will try to recover my changes soon.
>
> Kind of hard at the moment to use Pharo 2.0, with the segfaults.


Yes if you have a reproducible case we would love to get it.
This is probably related to the bug of the become implementation in Cog.
Esteban was working on getting also the Stack VM working so that we get a stable fallback.

Stef

>
> Thierry
> --
> Thierry Goubier
> CEA list
> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> 91191 Gif sur Yvette Cedex
> France
> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>


Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

Goubier Thierry
Le 11/03/2013 17:45, stephane ducasse a écrit :

>>>
>>> then you add symbolic version
>>>
>>> stable: spec
>>> <symbolicVersion: #'stable'>
>>>
>>> spec for: #'common' version: '1.1'.
>>> spec for: #'pharo1.4.x' version: '1.4'
>>> spec for: #'pharo2.0.x' version: '1.8'
>>>
>>> Have a look at the metacello chapter
>>
>> Done, but then I had a segfault (#becomeForward:)... well in fact two, trying to load SmaCCDev and OSProcess. Will try to recover my changes soon.
>>
>> Kind of hard at the moment to use Pharo 2.0, with the segfaults.
>
>
> Yes if you have a reproducible case we would love to get it.
> This is probably related to the bug of the become implementation in Cog.
> Esteban was working on getting also the Stack VM working so that we get a stable fallback.

The problem is that I can't reproduce it with what I load. Not enough
code, maybe. I'm saving often, now :)

Oh, the latest ConfigurationOfSmaCC is Ok for Pharo 1.4/Pharo 2.0 (all
tests are green). How do I publish it in PharoExtras?

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply | Threaded
Open this post in threaded view
|

Re: Porting SmaCC from 1.4 to 2.0; doSilently: equivalent ?

stephane ducasse
Thierry I added you to the PharoExtras team
and I created a project for Smacc.

owner: PharoExtras
project: Smacc


After I can have a look and create a ci job :)



On Mar 12, 2013, at 3:14 PM, Goubier Thierry <[hidden email]> wrote:

> Le 11/03/2013 17:45, stephane ducasse a écrit :
>>>>
>>>> then you add symbolic version
>>>>
>>>> stable: spec
>>>> <symbolicVersion: #'stable'>
>>>>
>>>> spec for: #'common' version: '1.1'.
>>>> spec for: #'pharo1.4.x' version: '1.4'
>>>> spec for: #'pharo2.0.x' version: '1.8'
>>>>
>>>> Have a look at the metacello chapter
>>>
>>> Done, but then I had a segfault (#becomeForward:)... well in fact two, trying to load SmaCCDev and OSProcess. Will try to recover my changes soon.
>>>
>>> Kind of hard at the moment to use Pharo 2.0, with the segfaults.
>>
>>
>> Yes if you have a reproducible case we would love to get it.
>> This is probably related to the bug of the become implementation in Cog.
>> Esteban was working on getting also the Stack VM working so that we get a stable fallback.
>
> The problem is that I can't reproduce it with what I load. Not enough code, maybe. I'm saving often, now :)
>
> Oh, the latest ConfigurationOfSmaCC is Ok for Pharo 1.4/Pharo 2.0 (all tests are green). How do I publish it in PharoExtras?
>
> Thierry
> --
> Thierry Goubier
> CEA list
> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> 91191 Gif sur Yvette Cedex
> France
> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
>