|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Compile problemHi everybody,
I am encountering some problems wanting to compile the sources of SableCC4. I followed the instruction on this page http://sablecc.org/wiki/ContributingCode to get the sources from the repository, configured my eclipse, and used the ant build file to generate the classes from the the grammars. After this I still have problems and can not compile the Java sources. It seems that the Java code need some nodes that does not exist anymore in the grammar. I get some error messages such as : /home/lucas/programmes/java/sablecc/src/org/sablecc/sablecc/structures/GlobalData.java:26: cannot find symbol [javac] symbol : class ALanguageName [javac] location: package org.sablecc.sablecc.syntax3.node [javac] import org.sablecc.sablecc.syntax3.node.ALanguageName; or The import org.sablecc.sablecc.syntax3.node.ASelection cannot be resolved I am wondering if the classes correspond to the grammars on the repository. Does anybody know how to compile the source from the repository? Thanks in advance Lucas _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
|
|
Re: Compile problemHi Lucas,
It seems that you are the first person to try it. I have stopped making my work in progress public a relatively long while ago. I left this minor compilation problem in place so that I would get feedback when somebody tried the code. I'll push the fix into the repository later today. Can I ask you what do you intend to do with the code? You know that it does not generate any output, right? Etienne Lucas Satabin wrote: > Hi everybody, > > I am encountering some problems wanting to compile the sources of SableCC4. > I followed the instruction on this page > http://sablecc.org/wiki/ContributingCode to get the sources from the > repository, ... I get some error messages such as : > > > /home/lucas/programmes/java/sablecc/src/org/sablecc/sablecc/structures/GlobalData.java:26: > cannot find symbol > [javac] symbol : class ALanguageName > [javac] location: package org.sablecc.sablecc.syntax3.node > [javac] import org.sablecc.sablecc.syntax3.node.ALanguageName; > Etienne M. Gagnon, Ph.D. SableCC: http://sablecc.org _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
|
|
Re: Compile problemHi,
Yes I know it does not produce anything for the moment ;) I checked out the code because I am really interested in developing a compiler compiler and the concepts used in SableCC are really interesting. I would like to understand how does it work, and I also had the idea to produce Scala code with SableCC. That's why I wanted to understand how the new macro system is made. And why not if I have some interesting ideas I could help :) Lucas Etienne M. Gagnon a écrit : > Hi Lucas, > > It seems that you are the first person to try it. I have stopped making > my work in progress public a relatively long while ago. I left this > minor compilation problem in place so that I would get feedback when > somebody tried the code. I'll push the fix into the repository later today. > > Can I ask you what do you intend to do with the code? You know that it > does not generate any output, right? > > Etienne > > Lucas Satabin wrote: >> Hi everybody, >> >> I am encountering some problems wanting to compile the sources of SableCC4. >> I followed the instruction on this page >> http://sablecc.org/wiki/ContributingCode to get the sources from the >> repository, ... I get some error messages such as : >> >> >> /home/lucas/programmes/java/sablecc/src/org/sablecc/sablecc/structures/GlobalData.java:26: >> cannot find symbol >> [javac] symbol : class ALanguageName >> [javac] location: package org.sablecc.sablecc.syntax3.node >> [javac] import org.sablecc.sablecc.syntax3.node.ALanguageName; >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > SableCC-Discussion mailing list > SableCC-Discussion@... > http://lists.sablecc.org/listinfo/sablecc-discussion _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
|
|
Re: Compile problem
Hi Lucas,
This is really great! I would love SableCC and ObjectMacro to have a Scala back-end. For this reason, it took me longer than anticipated to fix the repository. I wanted to make sure you got a version of ObjectMacro I would be comfortable for you to start playing with now. So, if you fetch the latest updates, you will get a "stable" version of ObjectMacro. Note: There's no need, really, to develop a distinct compiler generator for Scala based on SableCC ideas. SableCC 4 is designed explicitly to support various back-ends. (Unless you wanted to develop something entirely different, of course, e.g. not a linear approximate LR(K) parser, not a "DFA with markers" lexer generator", etc.) So, let's get you started on ObjectMacro. The current ObjectMacro already supports two targets:
The idea is that, to write a back-end for a new target, all one needs to do is to:
This architectural organization is very flexible. You could eventually write the Scala backend in Scala, without needing to rewrite SableCC nor Object macro in Scala (nor dynamically linking with Java). You simply use ObjectMacro to generate the intermediate output file. Then, you would use SableCC to generate a parser (selecting its scala target), and write the back-end in Scala. Of course, this would require some scala back-end to be written in Java, initially, for both SableCC and ObjectMacro. So, please have a little look at ObjectMacro. You only need to look at:
Hoping you have fun starting the work on a Scala back-end for ObjectMacro! Etienne PS: Please do not start playing with the SableCC code nor try to write a back-end. The public code is not up to date with my latest internal code, and it's not ready for prime time. Lucas Satabin wrote: Hi, Yes I know it does not produce anything for the moment ;) I checked out the code because I am really interested in developing a compiler compiler and the concepts used in SableCC are really interesting. I would like to understand how does it work, and I also had the idea to produce Scala code with SableCC. That's why I wanted to understand how the new macro system is made. And why not if I have some interesting ideas I could help :) Lucas -- Etienne M. Gagnon, Ph.D. SableCC: http://sablecc.org _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
|
|
Re: Compile problemThanks a lot for all these details and for going to a lot of trouble for me ;-) I'll try this when I'm at home. The macro structure sounds really powerful and I think I will need some times to really take advantages of this, it will have a lot of fun... Lucas Etienne M. Gagnon schrieb: Hi Lucas, _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
| Free embeddable forum powered by Nabble | Forum Help |