SableCC 3.7 Released

113 views
Skip to first unread message

Etienne Gagnon

unread,
Nov 28, 2012, 8:41:30 PM11/28/12
to sab...@googlegroups.com
Hi,

SableCC 3.7 was just released. It adds the following features:
  • Generated lexers can be used with custom push back readers implementing the IPushbackReader interface.
  • Lexer exceptions contains an invalid token that provides the location of the lexical error.
  • The parser method is divided into smaller methods (to avoid Java method size limits).

In particular, SableCC 3.7 is now able to handle the Java 1.7 grammar ( http://sablecc3.sablecc.org/wiki/Java-1.7 ).

Have fun with it!

Etienne

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

mbmast

unread,
Nov 29, 2012, 6:20:53 AM11/29/12
to sab...@googlegroups.com
sablecc-3.7.zip is password protected.

Etienne Gagnon

unread,
Nov 29, 2012, 6:51:46 AM11/29/12
to sab...@googlegroups.com
Hi "mbmast",

As far as I know, I have not encrypted the zip. I have tested it on two
machines and I was not asked for a password.

Could you describe your setup (e.g. operating system, zip software, etc.)?

Regards,

Etienne
P.S. It would be nice to know your real name.

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

On 2012-11-29 06:20, mbmast wrote:
> sablecc-3.7.zip is password protected.

Phuc Luoi

unread,
Nov 29, 2012, 7:00:25 AM11/29/12
to sab...@googlegroups.com
Hi, Etienne
I really like this new feature:


  • Generated lexers can be used with custom push back readers implementing the IPushbackReader interface.

I'll update the netbeans feature using this new feature.



--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en



Phuc Luoi

unread,
Nov 29, 2012, 7:02:30 AM11/29/12
to sab...@googlegroups.com
Hi Etienne,


I really like this new feature:

Generated lexers can be used with custom push back readers implementing the IPushbackReader interface.

I'll update the Netbeans Plugin with this new feature.

Hong Phuc.

Michael Mast

unread,
Nov 29, 2012, 11:16:01 AM11/29/12
to sab...@googlegroups.com
That's weird.  On Windows XP SP3 I right click on the downloaded .zip file and choose "Extract all..." from the popup menu.  This displays the "Extraction Wizard" ("Welcome to the Compressed (zipped) Folders Extraction Wizard).  I click "Next," specify a destination folder, click "Next" again and get a popup dialog box whose title is "Password needed," and whose body states "File 'sablecc-3.7 is password protected.  Please enter the password in the box below."  There is an input field for a password.

I'm going to try some stand alone unzip applications.  I'll report back.

Thanks,

Mike

(P.S. Sorry about the nickname setting.  I think I fixed that in my Google Group settings)


Phuc Luoi

unread,
Nov 29, 2012, 11:22:48 AM11/29/12
to sab...@googlegroups.com
Hi,
I confirm that I do not need password to open the zip file (unzip). My OS is debian

Hong Phuc




--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en
 
 

Michael Mast

unread,
Nov 29, 2012, 1:14:59 PM11/29/12
to sab...@googlegroups.com
Problem fixed.  Sorry about that.  My normal development account does not have access to the destination directory.  Unzipping as the admin worked fine.  Sort of dumb that Windows reports that the archive is password protected when in fact it is the user account that lacks the necessary privileges.

Etienne Gagnon

unread,
Nov 29, 2012, 1:32:30 PM11/29/12
to sab...@googlegroups.com
Hi Michael,

Thanks for reporting back. I was a little worried that some default
Windows configuration would cause problems.

Have fun!

Etienne

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

Message has been deleted

Alexander Ryzhov

unread,
Dec 8, 2012, 2:52:28 AM12/8/12
to sab...@googlegroups.com
Hi Etienne,

The latest sablecc version in Maven is 3.2. so is sablecc-maven-plugin. It would be awesome to update it. I can volunteer to help.

Alexander

Etienne Gagnon

unread,
Dec 8, 2012, 10:00:07 AM12/8/12
to sab...@googlegroups.com
Hi Alexander,

That's a very nice offer. I invite you to join efforts with Gonzalo. See
https://groups.google.com/d/msg/sablecc/gRn1-dXxp70/-97kpJboBC0J

Thanks!

Etienne

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

Gonzalo Ortiz Jaureguizar

unread,
Dec 8, 2012, 6:41:58 PM12/8/12
to sab...@googlegroups.com
Hi Alexander,

That would be nice. As I said in the other thread, I was studiying the maven plugin and it seems very simple. I have never worked with maven plugins, but it seems that it is a method that is called and we need to execute sablecc from there. Like sablecc is just a java program, it is enogth to call the correct sablecc method with valid arguments. That is what the actual plugin does and, if the sablecc API has no change, the maven code should be the same.

So, in the best case, we only need to "commit" the new version of sablecc (the sablecc "library") to mvn repositories, change the dependecy of the sablecc plugin and commit the sablecc plugin to mvn repositories.

The main "problem" is that we have to follow some protocol to upload artifacts (the word that maven use to call a project, jar, etc). I can not remeber where I read it, it could look for it. But, I think that the most important point is to have a private mvn repository server to deploy the new version and tell people from maven where are the artifacts uploaded.


2012/12/8 Etienne Gagnon <ega...@j-meg.com>
--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en



Alexander Ryzhov

unread,
Dec 12, 2012, 12:32:32 PM12/12/12
to sab...@googlegroups.com
Hi Gonzalo,

I agree with your assessment and I'd like to add that one more obstacle is to take ownership of the maven sablecc plugin which has no developers listed. I suggest that you focus on putting the latest sablecc into maven and I'll focus on the maven plugin. Will that work for you?

Thanks,
Alexander


2012/12/8 Etienne Gagnon <ega...@j-meg.com>
--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en



Gonzalo Ortiz Jaureguizar

unread,
Dec 12, 2012, 2:51:45 PM12/12/12
to sab...@googlegroups.com
Well, I was talking about sablecc maven plugin. Sablecc "library" is going to be used only by this plugin (i think is not very usual tu parse a gramar dynamically from code ^_^).


2012/12/12 Alexander Ryzhov <aryz...@gmail.com>

Alexander Ryzhov

unread,
Dec 18, 2012, 1:44:35 AM12/18/12
to sab...@googlegroups.com
Hi Gonzalo,

Are you suggesting to make sablecc library part of maven plugin? I haven't been able to get developer access to the maven plugin project.

Alexander

Gonzalo Ortiz Jaureguizar

unread,
Dec 18, 2012, 4:10:30 AM12/18/12
to sab...@googlegroups.com
Hi Alexander,

I would really like to help, but I am very busy these days. I found the sources of the actual sablecc-maven-plugin here. As you can see, there are two important files:
  1. the pom file
  2. the java class (a mojo)

In the java class, this code calls the sablecc java method that genererates the lexer and parser:

org.sablecc.sablecc.SableCC.processGrammar(grammar, new File(outputDirectory));

This code can be called from the plugin because the pom.xml file includes a dependency to sablecc "library" (on other words, to the same sablecc.jar we usually execute when we want to generate our parser from command line). This dependency is defined by
    <dependency>
      <groupId>sablecc</groupId>
      <artifactId>sablecc</artifactId>
      <version>3.2-1</version>
    </dependency>
 I didn't look for the modern versions of sablecc, but I suppose that this "processGrammar" (or something similar) is still there, so we have to do this modifications:
  1. Upload a new "sablecc library" version to mvn central repositories (for example, the version 3.7).
  2. Modify the "sablecc-maven-plugin" pom.xml changing the <version>3.2-1</version> to something like <version>3.7</version>
  3. If org.sablecc.sablecc.SableCC.processGrammar method change, we have to update also the mojo.
  4. Finally we have to upload the new "sablecc-maven-plugin" to mvn central repositories.

As you can see, the "code part" is almost trivial. The hardest task is to upload new versions to mvn central repositories. In this page people from mvn explain the process.

Of course we can upload library and plugin as a single bundle, but I think is better to deploy the library separated from the plugin. That could be useful if someone has a very strange project that generates parsers "on the fly"


Gonzalo



2012/12/18 Alexander Ryzhov <aryz...@gmail.com>
Hi Gonzalo,

Are you suggesting to make sablecc library part of maven plugin? I haven't been able to get developer access to the maven plugin project.

Alexander
Reply all
Reply to author
Forward
0 new messages