Status of SableCC 4

49 views
Skip to first unread message

fidel....@gmail.com

unread,
Dec 23, 2021, 10:33:16 AM12/23/21
to SableCC
Hello, Ettiene!

I hope you are doing well.

It had been a while since I used SableCC, but later I have found the need to use it. The last time I checked, I think two or three years ago,  I noticed there was work on a new version of SableCC (version 4). However, after looking at the repository today, I see that it has been stalled for three years. I know that it is still in beta, but what sort of improvements does it still need?

Is there some documentation on the new features? I tried to find documentation on ObjectMacro, but couldn't find any. All I could find were the examples in the SableCC 4 source code.

I'd like to give it a try, but was wondering if there is any pointer other than looking at the code.

Thank in advance!

Fidel H Viegas

Etienne Gagnon

unread,
Dec 23, 2021, 11:09:06 AM12/23/21
to sab...@googlegroups.com
Hi Fidel,

I'm doing well. I hope you're doing well too.

It's best to stick with the latest stable version, SableCC 3.7. It's the version I use for serious work.

The beta version of version 4 isn't stable. It lacks convenient features like regular operators (*, +, and ?) and tree transformations. It also has some known defects (like incorrect handling of unary operators).

I've supervised the work of Lâm Tran Van Ba for his Master's thesis on ObjectMacro 2.0. Documentation is only available in French; it's Chapter 1 of his thesis (https://archipel.uqam.ca/12655/). It's stable (not beta), but I think ObjectMacro needs additional design improvements before I encourage people to use it.

Have fun!

Etienne

Etienne Gagnon, Ph.D.
http://sablecc.org


--
You received this message because you are subscribed to the Google Groups "SableCC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sablecc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sablecc/a4e94ed7-b15e-40a3-aed1-d9f34d252db7n%40googlegroups.com.

fidel....@gmail.com

unread,
Dec 24, 2021, 8:16:58 AM12/24/21
to SableCC
Hi, Etienne!

Thanks for the prompt reply and feedback. 

I am doing well, thank you!

It had been a while since I did some parsing. The last project I worked one was a SQLBase to MySQL translator. Now I am putting together a transpiler for Pascal to Go. I have standard Pascal code that I need to translate to Go, and it is faster to put together a translator than to convert the code manually. There are certainly some things that will need some manual adjustments, but the core will be much faster with a transpiler.

I actually took some time to build it and play around with it. I noticed all the test grammars are no longer valid, which I guess was used in an earlier syntax. That made me play around with it a bit, by fixing them based on the SableCC 4 grammar. 

After fixing the code, I was hoping to see some code generated, but t my surprise, I see only a message saying that SableCC successfully compiled the grammar. When I looked at the code, I saw that the code generation section was commented out with TODO messages.

I liked the fact that SableCC 4 switched to an LR(K) parser generator, but now that you mention that it isn't usable I had no choice other than switch back to SableCC 4. 

Regarding your feedback, is it just the Lexer generator that isn't complete, or the parser as well? I noticed that you have a different AST structure and the new Walkers (Visitors). If the parser code is complete, is there a way of us hooking a hand generated scanner that uses the new Token class structure, or even adapting a scanner generated by SableCC 3? Or in terms of features, it lacks both the Lexer and Parser generator?

I will look into the paper you referred to me about ObjectMacro. Thanks for the pointer!

I look forward to hearing from you again, and take the opportunity to wish you and the rest of the SableCC community a wonderful Christmas Eve.

Take care!

Fidel H Viegas

Etienne Gagnon

unread,
Dec 24, 2021, 9:01:19 AM12/24/21
to sab...@googlegroups.com
Hi Fidel,

The most usable development version is 4-beta.2, but it has known defects. The git repository head is unusable. The lexer generator of 4-beta is the most complete part. It's the rest which is severely lacking: no lexer states, no * + ? operators in grammars, no tree transformations, parser limited to linear approximate LALR(K), defects in ambiguity resolution directives, etc. I've used the beta versions in my compiler courses in a controlled way, making sure students didn't have to use defective parts, to get feedback on specific aspects of the design. It's definitely not ready for use within real projects.

For your new project, I strongly recommend using version 3.7 which has very powerful features like automatically resolving some conflicts (through transparent inlining).

Best holiday wishes to you and to all the community!


Etienne
 
Etienne Gagnon, Ph.D.
http://sablecc.org

fidel....@gmail.com

unread,
Dec 27, 2021, 11:52:39 AM12/27/21
to SableCC
Hi Etienne,

Thanks a lot for the explanation! I have already began working with SableCC 3.7. I may play around with SableCC 4 in the future.  Thanks for letting me know about its state.

Regards,

Fidel H Viegas

fidel....@gmail.com

unread,
Dec 27, 2021, 11:52:55 AM12/27/21
to SableCC
Hi again,

I tried to download the Object Macro 2.0 Master Thesis, but I was unable to. The link is broken. Tried to search on Google and all the links I found are broken. Is there any other pointer to this thesis?

Thanks in advance!

Regards,

Fidel H Viegas

On Thursday, December 23, 2021 at 5:09:06 PM UTC+1 Etienne Gagnon wrote:

Etienne Gagnon

unread,
Dec 27, 2021, 12:00:44 PM12/27/21
to sab...@googlegroups.com
Hi Fidel,

The official link is " http://archipel.uqam.ca/id/eprint/12655 " (which redirects to the link I provided earlier). The page contains a link to Lâm's thesis about ObjectMacro 2 : " http://archipel.uqam.ca/12655/1/M16112.pdf ".

Have fun!

Etienne

Etienne Gagnon, Ph.D.
http://sablecc.org

fidel....@gmail.com

unread,
Dec 29, 2021, 3:39:55 PM12/29/21
to SableCC
Hi Etienne,

Thanks again for the link! 

Unfortunately, I am still getting a connection time out. Could it be that the link is not accessible to outside users?

Thanks once again.

Regards,

Fidel H Viegas

Etienne Gagnon

unread,
Dec 29, 2021, 3:47:26 PM12/29/21
to sab...@googlegroups.com
Hi Fidel,

It's a public site open to all. I'll contact you in private.

Cheers,

Etienne

Etienne Gagnon, Ph.D.
http://sablecc.org

Niklas Matthies

unread,
Dec 29, 2021, 4:39:20 PM12/29/21
to sab...@googlegroups.com
Hi Etienne,

I can confirm that all requests to http://archipel.uqam.ca/ are timing
out. Traceroute is showing that all packets are getting lost behind
uqam2-gw.risq.net (207.162.108.178).

Xheers,
Niklas
>>>>>> <https://groups.google.com/d/msgid/sablecc/a4e94ed7-b15e-40a3-aed1-d9f34d252db7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "SableCC" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to sablecc+u...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/sablecc/ddc07a23-7c3c-4cb9-b1df-eef78151ce43n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/sablecc/ddc07a23-7c3c-4cb9-b1df-eef78151ce43n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "SableCC" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to sablecc+u...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sablecc/7b5eb84d-b1a3-4f92-b25d-f25434629413n%40googlegroups.com
>> <https://groups.google.com/d/msgid/sablecc/7b5eb84d-b1a3-4f92-b25d-f25434629413n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>--
>You received this message because you are subscribed to the Google Groups "SableCC" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to sablecc+u...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/sablecc/CA%2BvLrVP20x%3D_ek5N%2BAR%3D%3DzSWoxhQLR86C9KTTw33%2B6vODNSFHw%40mail.gmail.com.

Etienne Gagnon

unread,
Dec 29, 2021, 4:48:15 PM12/29/21
to sab...@googlegroups.com
Hi Niklas,

Thanks for the independent problem confirmation. I will report this serious problem to UQAM's Library staff. (Note that UQAM is closed for the holidays; it will reopen in January).

Cheers,

Etienne

Etienne Gagnon, Ph.D.
http://sablecc.org

Reply all
Reply to author
Forward
0 new messages