happy parser generator - stack space overflow error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

happy parser generator - stack space overflow error

Mageshkumar Kuppusamy
Hello folks, I am generating a parser for SystemVerilog language using happy parser generator. 
I have the *.y file which i run using happy as below

happy -gca ParSysverilog.y and i get the below error.

Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

to increase the stack size and to get more info on the error, i learned that i need to use something like below.
happy -RTS -K16384 -sstderr +RTS -gca ParSysverilog.y
but i got an error message

happy: Most RTS options are disabled. Link with -rtsopts to enable them.

does this mean that, i need to recompile happy source code using the "-rtsopts" to use the +RTS...-RTS options ?
any recommendations from your experience ?

Thank you in advance

Magesh




_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: happy parser generator - stack space overflow error

Tobias Dammers
In my experience, using one of the excellent parser-combinator libraries out there (megaparsec, attoparsec, trifecta) is usually less painful and perfectly adequate.

On Dec 25, 2016 7:49 AM, "Mageshkumar Kuppusamy" <[hidden email]> wrote:
Hello folks, I am generating a parser for SystemVerilog language using happy parser generator. 
I have the *.y file which i run using happy as below

happy -gca ParSysverilog.y and i get the below error.

Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize -RTS' to increase it.

to increase the stack size and to get more info on the error, i learned that i need to use something like below.
happy -RTS -K16384 -sstderr +RTS -gca ParSysverilog.y
but i got an error message

happy: Most RTS options are disabled. Link with -rtsopts to enable them.

does this mean that, i need to recompile happy source code using the "-rtsopts" to use the +RTS...-RTS options ?
any recommendations from your experience ?

Thank you in advance

Magesh




_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: happy parser generator - stack space overflow error

Albert Y. C. Lai
In reply to this post by Mageshkumar Kuppusamy
On 2016-12-25 01:49 AM, Mageshkumar Kuppusamy wrote:
> happy -gca ParSysverilog.y and i get the below error.
>
> Stack space overflow: current size 8388608 bytes.
> Use `+RTS -Ksize -RTS' to increase it.

This is strange (read: archaic) because GHC since 7.10 (or maybe
earlier) has been defaulting stack size to "80% physical memory size"
rather than 8MB. Contrapositively, seeing the 8MB cap implies that your
copy of happy was built by a pretty old GHC.

So simply rebuild happy by a recent GHC to enjoy the modern stack cap.

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: happy parser generator - stack space overflow error

Brandon Allbery

On Sun, Dec 25, 2016 at 2:32 PM, Albert Y. C. Lai <[hidden email]> wrote:
This is strange (read: archaic) because GHC since 7.10 (or maybe earlier) has been defaulting stack size to "80% physical memory size" rather than 8MB. Contrapositively, seeing the 8MB cap implies that your copy of happy was built by a pretty old GHC.

7.8, I think --- meaning this is probably Debian with 7.6 from packages.

--
brandon s allbery kf8nh                               sine nomine associates
[hidden email]                                  [hidden email]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.