[ nice-Bugs-1173887 ] The following code crashes the compiler
"SourceForge.net" <[email protected]> Sun, 25 Nov 2007 09:58:18 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1173887, was opened at 2005-03-31 10:06 Message generated for change (Settings changed) made by bonniot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1173887&group_id=12788 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: The following code crashes the compiler Initial Comment: [email protected] Nice compiler version 0.9.10 (build 2005.02.25, 16:35:29 UTC) Compiled using JDK 1.4.2_04 Copyright (C) 2003 Daniel Bonniot Visit the Nice homepage: http://nice.sourceforge.net Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09) Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode) The following code crashes the compiler package my.program; class Feature { String descr; String getDescr() { return ?descr; } } C:\Nice>nicec my.program nice.lang: parsing my.program: parsing An exception has occured in the compiler Please fill-in a bug report at the following webpage: http://sourceforge.net/tracker/? func=add&group_id=12788&atid=112788 Stack trace: Exception in thread "main" bossa.parser.Parser$LookaheadSuccess at bossa.parser.Parser.<init>(Parser.java:8321) at bossa.parser.JavaccParser.read (JavaccParser.java:67) at bossa.modules.Content.read(Content.java:111) at bossa.modules.Content.getDefinitions (Content.java:86) at bossa.modules.Package.read (Package.java:122) at bossa.modules.Package.<init> (Package.java:88) at bossa.modules.Package.make (Package.java:59) at bossa.modules.fun.setMainPackage (Compilation.nice:89) at bossa.modules.Compilation.setMainPackage (Compilation.nice) at nice.tools.compiler.fun.compile (interface.nice:37) at bossa.modules.Compilation.compile (Compilation.nice) at nice.tools.compiler.console.fun.compile (main.nice:165) at nice.tools.compiler.console.dispatch.compile (Unknown Source) at nice.tools.compiler.console.fun.main (main.nice:199) at nice.tools.compiler.console.dispatch.main (Unknown Source) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-03-31 11:36 Message: Logged In: NO [email protected] The ? was just a typo. Thanks for getting back to me so quickly. ---------------------------------------------------------------------- Comment By: Daniel Bonniot (bonniot) Date: 2005-03-31 10:46 Message: Logged In: YES user_id=88952 Hi, There is a syntax error in your program, and a known bug in the parser generator we use incorrectly reports it. Instead of: return ?descr; you should just write: return descr; Could you please tell us why you thought a '?' was needed there? You are not the first person to report this problem, and we would like to understand if there is a wrong example or documentation somewhere that suggests this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1173887&group_id=12788 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/