Deubgging; input view; AST view

0 views
Skip to first unread message

craigu...@gmail.com

unread,
Mar 5, 2007, 8:49:26 PM3/5/07
to PlacidSystems.AntlrStudio
Hello,

I have downloaded the trial version of ANTLR Studio, and I am
having trouble with debugging a grammar (.g file). I have tried
opening the debug perspective and executing a debug configuration on
the .g file, but I get errors about the source code being not found.
I know that the debug perspective recognzies the .g file because I can
see the special outline view for it.

I want to do the following: set a breakpoint, enter text into
the input view, and see the AST in its view. I have also tried
debugging the Java files generated by ANTLR Studio, but that process
does not seem to know about the .g file.


Sincerely,
Craig

prasha...@gmail.com

unread,
Mar 6, 2007, 11:39:11 PM3/6/07
to PlacidSystems.AntlrStudio
what is the exact error msg u are getting?

Prashant

Atif

unread,
Apr 25, 2007, 7:36:59 AM4/25/07
to PlacidSystems.AntlrStudio
Hi,
I am getting exactly the same problem. im too using the trial version
and i require the same features Craig needs.
I am getting no errors when i run debug, only that I dont know what
code to put in the sole java main?
I hav also tried to place breakpoints on the grammar file and tried to
build it, hoping that i might see some debug activity there, but it
just generated the required source code.

Hilfe.
Atif.

On Mar 6, 3:49 am, "craigugor...@gmail.com" <craigugor...@gmail.com>
wrote:

Prashant Deva

unread,
Apr 25, 2007, 7:41:03 AM4/25/07
to antlr...@googlegroups.com
> I am getting no errors when i run debug, only that I dont know what
> code to put in the sole java main?

What do you mean by this?
Do you have any code which actually executes and runs the parser?

The input view shows the text that was passed to a parser/lexer.
You can pass your parser a file containing the text you want to test
it with and see it in the that view.

Prashant

Atif

unread,
Apr 26, 2007, 5:16:33 AM4/26/07
to PlacidSystems.AntlrStudio
Thanx for the quick reply.

Yes I have code which instantiates a lexer and a parser but nothing
happened as earlier. Then i added three parser functions calls and now
i am getting an error that debuggingcharbuffer.class cannot be found.
Its strange because i can import it in eclipse and the code complete
feature of eclipse shows it as well. However, i don't have this file
with me. I have added all antlrstudio jar files in my debug
configuration but it still cant find it.

Atif.

However, before i

Atif

unread,
Apr 26, 2007, 11:32:05 AM4/26/07
to PlacidSystems.AntlrStudio
There is more to that.
Later on, i tried to overcome a known eclipse bug of 'source not
found' error when breakpoints r placed in the code during debugging,
eclipse sort of misses the class source in the project jars.
however, my problems remain. However, after removing antlr studio and
doing a fresh installation with eclipse -clean startup, i get these
errors:

Errors during build.
Error instantiating builder: AntlrStudio.antlrGrammarbuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
Error instantiating builder: AntlrStudio.markerManipulatorBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
Error instantiating builder: AntlrStudio.smapBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.SMapInstallerBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.SMapInstallerBuilder.

However, apparently none of these packages r related to troublesome
class DebuggingCharBuffer.class which belongs to AS' debug jar.
I am using Eclipse 3.2 and ANTLR is ofcourse 2.7.6 which ships with
the latest studio.

Hilfe,
Atif.

prasha...@gmail.com

unread,
Apr 27, 2007, 3:32:22 AM4/27/07
to PlacidSystems.AntlrStudio
> However, after removing antlr studio and
> doing a fresh installation with eclipse -clean startup, i get these
> errors:

did you reinstall and then enabled antlr studio on the project again?

Prashant

Atif

unread,
Apr 27, 2007, 4:06:18 AM4/27/07
to PlacidSystems.AntlrStudio
yes I did. But same as before.
i can build grammars but cant debug them.

Prashant Deva

unread,
Apr 27, 2007, 4:09:02 AM4/27/07
to antlr...@googlegroups.com
> yes I did. But same as before.
> i can build grammars but cant debug them.

Have you followed the steps in this faq -
http://www.placidsystems.com/faq.aspx#b

Prashant

Atif

unread,
Apr 27, 2007, 4:36:53 AM4/27/07
to PlacidSystems.AntlrStudio

Prashant Deva

unread,
Apr 27, 2007, 4:53:33 AM4/27/07
to antlr...@googlegroups.com
>Then i added three parser functions calls and now
>i am getting an error that debuggingcharbuffer.class cannot be found.
>Its strange because i can import it in eclipse and the code complete
>feature of eclipse shows it as well.

So is this the error message you are getting? do you mean it throws a
classnotfound exception at runtime?
or are you getting no error msg at all?

is the asdebug jar included in your build path?

Prashant

Atif

unread,
Apr 27, 2007, 5:13:23 AM4/27/07
to PlacidSystems.AntlrStudio
yes, i hav added the asdebug jar file in my build path.
the class interface is available to me at compile time.
but at runtime, it says:
---------------------
source not found:

The source attachment does not contain the source for the file
DebuggingCharBuffer.class.
You can change the source attachment by clicking Change Attachment
Souce below. (button)

-----------------------
When i do that, the error persists.

This is the file: antlrdebug_1.0.0.jar, (19.2 KB)

Atif.

Prashant Deva

unread,
Apr 27, 2007, 5:28:25 AM4/27/07
to antlr...@googlegroups.com
Ok. It turns out you are trying to step inside the debuggingcharbuffer
class somehow.
Eclipse is trying to tell you that the source files for
debuggingcharbuffer is not available, which is obvious since we dont
provide the source for that lib. This is not an error msg. it is just
trying to break at that point.

Does your 'console' view show any exception being thrown?

Prashant

Atif

unread,
Apr 27, 2007, 6:02:35 AM4/27/07
to PlacidSystems.AntlrStudio
Ah finally,
after i finish with the debugging, i get this error in my console
view:
----------------------------------------------------------
java.lang.IllegalAccessError: tried to access field
antlr.CharBuffer.input from class
antlr.antlrStudio.DebuggingCharBuffer
at
antlr.antlrStudio.DebuggingCharBuffer.<init>(DebuggingCharBuffer.java:
28)
at myPackage.DICTestLexer.<init>(DICTestLexer.java:36)
at myPackage.ANTLRDebugger.main(ANTLRDebugger.java:18)
-------------------------------
this gives me the hint that eclipse cant find the class but my eclipse
is running fine, ive tested other jars using the same eclipse debug
configuration.
im going nuts here.

Prashant Deva

unread,
Apr 27, 2007, 6:05:14 AM4/27/07
to antlr...@googlegroups.com
Did you download the antlr jar separately from the antlr site and
added to your buildpath?

You are not supposed to do that. While debugging, antlr studio uses a
custom modified antlr jar.

Prashant

Atif

unread,
Apr 27, 2007, 6:17:56 AM4/27/07
to PlacidSystems.AntlrStudio
yes i downloaded antlrstudio separetely and extracted it in the
eclipse folder.
i tried to do the automatic installation as mentioned on the website
but i get this error after trying to update my eclipse from
http://placidsystems.com/updates/as/:

---------
Network connection problems encountered during search.
Unable to access "http://placidsystems.com/updates/as/".
Unable to access site: "http://placidsystems.com/updates/
as/" [placidsystems.com]
Unable to access site: "http://placidsystems.com/updates/
as/" [placidsystems.com]
--------

I hav tried with appending www to the url as well, so cant b my
network problem.

Prashant Deva

unread,
Apr 27, 2007, 7:02:47 AM4/27/07
to antlr...@googlegroups.com
no i am not talking about antlrstudio.
did you download the 'antlr' jar separately from the antlr.org website
and add it to your classpath?

Prashant

Prashant Deva

unread,
Apr 27, 2007, 7:05:35 AM4/27/07
to antlr...@googlegroups.com
> ---------
> Network connection problems encountered during search.
> Unable to access "http://placidsystems.com/updates/as/".
> Unable to access site: "http://placidsystems.com/updates/
> as/" [placidsystems.com]
> Unable to access site: "http://placidsystems.com/updates/
> as/" [placidsystems.com]
> --------

the url seems to be working fine for me. if you try to access it
directly from your browser of course then it will give an error.

Did you follow the instructions mentioned here to use the automatic
update site -
http://www.placidsystems.com/info/updatesite.aspx

Prashant

Atif

unread,
Apr 27, 2007, 9:43:48 AM4/27/07
to PlacidSystems.AntlrStudio
I have just tried it now. it didnt help. I tried with both antlr2.7.7
and antlr 2.7.6 separate jar file but to no avail.
However, i am using windows 2000 and not an administrator, my java
classpath is a user variable and not a system variable, which usually
works. On Monday, i will exhaust this possibility as well by becoming
an admin to try it again but i am not so optimistic about it.


On another note, i have found out the reason to one of the errors i
was getting, i.e.


Errors during build.
Error instantiating builder: AntlrStudio.antlrGrammarbuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
Error instantiating builder: AntlrStudio.markerManipulatorBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
Error instantiating builder: AntlrStudio.smapBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.SMapInstallerBuilder.
Plug-in AntlrStudio was unable to load class
antlr_Studio.ui.build.builders.SMapInstallerBuilder.

Sometimes, Eclipse environment loads up before the message box
indicating remaining evaluation days especially when NOT invoked with
the eclipse -clean option, so when i try to invoke the debugger before
this message box appears, i get the above error. Makes sense too,
AntlrStudio UI isnt loaded yet.

So now we have lesser directions to follow.

Atif

unread,
Apr 27, 2007, 9:59:00 AM4/27/07
to PlacidSystems.AntlrStudio
yes i am not accessing the update site through a browser but through
eclipse only. If its working fine at your end, then i wonder whats
wrong here. Can't be a firewall can it? its after all an http request
by eclipse (assummingly on port 80) which should go through...

Prashant Deva

unread,
Apr 27, 2007, 5:51:31 PM4/27/07
to antlr...@googlegroups.com
On 4/27/07, Atif <atif.abd...@gmail.com> wrote:
>
> I have just tried it now. it didnt help. I tried with both antlr2.7.7
> and antlr 2.7.6 separate jar file but to no avail.
That is exactly what you are *not* supposed to do.
I said, do *not* download the jar from antlr.org site. let antlr
studio supply its own jar.

> However, i am using windows 2000 and not an administrator, my java
> classpath is a user variable and not a system variable, which usually
> works. On Monday, i will exhaust this possibility as well by becoming
> an admin to try it again but i am not so optimistic about it.

thats irrelevant. when you execute a program in eclipse, eclipse
provides it its own classpath.

> On another note, i have found out the reason to one of the errors i
> was getting, i.e.
> Errors during build.
> Error instantiating builder: AntlrStudio.antlrGrammarbuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.AntlrGrammarBuilder.
> Error instantiating builder: AntlrStudio.markerManipulatorBuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.MarkerManipulatorBuilder.
> Error instantiating builder: AntlrStudio.smapBuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.SMapInstallerBuilder.
> Plug-in AntlrStudio was unable to load class
> antlr_Studio.ui.build.builders.SMapInstallerBuilder.


You told me previously that you had solved this error and you were
able to build fine.
how did you manage to do this again.

Try this.

-make sure port 55551 is not blocked. antlr studio uses this to debug
the grammar.
- do a clean install of eclipse and antlr studio.
- enable antlr studio on your project.
- set a breakpoint on one of the rules in the grammar.
- debug.

do NOT download the antlr jar from antlr.org. antlr studio will
automatically add its own antlr jar which it needs to run its
debugger.

Prashant

Atif

unread,
May 28, 2007, 6:28:16 PM5/28/07
to PlacidSystems.AntlrStudio
AntlrStudio works fine now. It was the problem with having antlr2.7.7
alongside antlr studio jars. A fresh install of all fixed the errors.
I have been using it and the debugger comes in very very handy.

Sorry for the late reply by the way.

On Apr 27, 11:51 pm, "Prashant Deva" <prashant.d...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages