[antlr-interest] Memory issue with ANTLR
Jayani Withanawasam
jayaniw at ecollege.com
Wed Jun 1 06:13:31 PDT 2011
Thanks Mark,
If I do not increase the max heap size, I will not get the reference
issues.
So, as you have mentioned, this can be something to do with the C# ANTLR
runtime and grammar files.
I tried the command you sent also.(To increase heap size) But still I
get the same error.
Regards,
Jayani.
-----Original Message-----
From: Mark Wright [mailto:markwright at internode.on.net]
Sent: Wednesday, June 01, 2011 6:01 PM
To: Jayani Withanawasam; antlr-interest at antlr.org
Subject: RE: [antlr-interest] Memory issue with ANTLR
On Wed, 1 Jun 2011 17:24:21 +0530, Jayani Withanawasam
<jayaniw at ecollege.com> wrote:
> Thanks Mark,
>
> The issue is the following command seems to be incorrect:
>
> java -cp
>
"D:\Jay_CC\P4\user\brettp\SQLStandardsChecker\Ecollege\CodeStandards\ext
> \ANTLR\lib\antlr-3.3-complete.jar" -Xms32M -Xmx512M org.antlr.Tool
> -message-format vs2005 -Xconversiontimeout 30000
>
"D:\Jay_CC\P4\user\brettp\SQLStandardsChecker\Ecollege\CodeStandards\Par
> ser\tsqllexer.g"
>
"D:\Jay_CC\P4\user\brettp\SQLStandardsChecker\Ecollege\CodeStandards\Par
> ser\tsql.g"
>
"D:\Jay_CC\P4\user\brettp\SQLStandardsChecker\Ecollege\CodeStandards\Par
> ser\tsqlwalker.g"
>
> The timeout is set to 30000 here. But how to increase the max heap
size
> in this command?
>
> Regards,
> Jayani.
Hi Jayani,
It looks like you may have already increased the max heap size with the
-Xms32M -Xmx512M options, I guess java does not care if its M or m for
megabytes, I use m, like:
java -Xmx512m -classpath $(ANTLR_CLASSPATH) org.antlr.Tool
-Xconversiontimeout 1200000 -report mygrammar.g
Anyway back in your first email, it looked like you sort of got past
that when running it in visual studio, and instead got this error:
> When I applied this I get namespace/ reference issues related to
grammar
> files.
> Ex:
> The type or namespace name 'IAstRuleReturnScope' could not be found
(are
> you missing a using directive or an assembly reference?)
>
D:\Jay_CC\P4\user\brettp\SQLStandardsChecker\Ecollege\CodeStandards\Pars
> er\tsql_tsqlcursors.cs 875 69 Parser
But I don't know how to fix this error (I don't know if
IAstRuleReturnScope is
something in your code or the C# ANTLR runtime).
Regards, Mark
More information about the antlr-interest
mailing list