This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Running today's build against empty user dir. Note that PHP support is now a part of the full build. 1) IAE is thrown from Schlieman parser upon NB startup: java.lang.IllegalArgumentException at org.netbeans.modules.languages.parser.DG.addNode(DG.java:108) at org.netbeans.modules.languages.parser.DGUtils.merge(DGUtils.java:137) at org.netbeans.modules.languages.parser.DGUtils.merge(DGUtils.java:189) at org.netbeans.modules.languages.parser.DGUtils.merge(DGUtils.java:189) at org.netbeans.modules.languages.parser.DGUtils.merge(DGUtils.java:189) at org.netbeans.modules.languages.parser.DGUtils.append(DGUtils.java:99) at org.netbeans.modules.languages.parser.Pattern.append(Pattern.java:532) at org.netbeans.modules.languages.parser.Pattern.createIn(Pattern.java:220) at org.netbeans.modules.languages.parser.Pattern.createIn(Pattern.java:222) at org.netbeans.modules.languages.parser.Pattern.createIn(Pattern.java:222) at org.netbeans.modules.languages.parser.Pattern.create(Pattern.java:74) at org.netbeans.modules.languages.NBSLanguageReader.readPattern(NBSLanguageReader.java:758) at org.netbeans.modules.languages.NBSLanguageReader.readToken(NBSLanguageReader.java:269) at org.netbeans.modules.languages.NBSLanguageReader.readBody(NBSLanguageReader.java:228) at org.netbeans.modules.languages.NBSLanguageReader.readNBS(NBSLanguageReader.java:214) at org.netbeans.modules.languages.NBSLanguageReader.getTokenTypes(NBSLanguageReader.java:140) at org.netbeans.modules.languages.LanguageImpl.read(LanguageImpl.java:263) at org.netbeans.modules.languages.LanguagesManager$2.run(LanguagesManager.java:144) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) 2) Attempt to create a PHP project results in a loop of exceptions: Caused: java.lang.RuntimeException: Language for mime-type text/x-pure-php5 is not found at org.netbeans.modules.php.lexer.PhpTokenId.getPurePhpLanguage(PhpTokenId.java:173) at org.netbeans.modules.php.lexer.PhpTokenId.getPhpLanguage(PhpTokenId.java:97) at org.netbeans.modules.php.model.impl.PhpModelImpl.doSync(PhpModelImpl.java:277) at org.netbeans.modules.php.model.impl.PhpModelImpl.access$100(PhpModelImpl.java:83) at org.netbeans.modules.php.model.impl.PhpModelImpl$1.run(PhpModelImpl.java:161) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1206) at org.netbeans.modules.php.model.impl.PhpModelImpl.sync(PhpModelImpl.java:159) at org.netbeans.modules.languages.php.PhpParser.parseFiles(PhpParser.java:142) at org.netbeans.napi.gsfret.source.Source.moveToPhase(Source.java:880) [catch] at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1192) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:613) The problem might be as well located in the PHP nbs file but it looks like there hasn't been any changes lately.
Created attachment 54690 [details] Full IDE log
Still reproducible in today's build, however there is a new message: Editors/text/x-pure-php5/langauge.nbs: Can not resolve first set for UnaryExpression. Conflicting input: "&" "new" <php_variable_variable>. It hints that the problem could be possibly solved/worked around by amending the nbs file.
Thank you Dane for volunteering to take over this issue :-)
According to ppisl the problem appeared between Jan 2nd and 3rd (the daily build for the 2nd is OK, the one from the 3rd has the problem)
*** Issue 125205 has been marked as a duplicate of this issue. ***
There is probably some conflict in PHP gramar. Thats why the parser is not able to initialize. So I am changing conflict detection as a first part of fix of this issue: IDE: [1/14/08 6:29 PM] Committing "First.java" started Checking in First.java; /cvs/languages/engine/src/org/netbeans/modules/languages/parser/First.java,v <-- First.java new revision: 1.5; previous revision: 1.4 done IDE: [1/14/08 6:29 PM] Committing "First.java" finished
Second part of this issue should be fixed in PHPTokenId class. Method getPurePhpLanguage () contains some code waiting on initialization of "text/x-pure-php5" language. This code is not correct. Fix it, please.
Here are productions (from purePHP5.nbs) causing the conflict: NewExpression = [ "&" ] "new" <php_identifier> [ Arguments ]; UnaryExpression = LeftHandSideExpression | ( UnaryOperator UnaryExpression ); UnaryOperator = "&" | "!" | "~" | "-" | "++" | "--" | "@" | <php_type_cast>; LeftHandSideExpression = CallExpression | NewExpression | BuiltInCallExpression | LanguageConstructExpression | ArrayExpression | ListExpression; When there is & new identifier in a php source file, it can be parsed as NewExpression (& new identifier) but also as UnaryOperator (&) followed by NewExpression (new identifier). To fix this, it is sufficient to modify the production for NewExpression as follows NewExpression = "new" <php_identifier> [ Arguments ]; i.e., to remove [ "&" ]
You are right ! Thank you for catching this. This concerns to message "Conflicting input: "&" "new" <php_variable_variable>. " So it solves the problem. To Jan Jancura: About this statement: >Second part of this issue should be fixed in PHPTokenId class. Method getPurePhpLanguage () contains some code waiting >on initialization of "text/x-pure-php5" language. This code is not correct. Fix it, please. Please note that currently all works fine. You say that code is incorrect. Please point where is error in this code EXACTLY . And please provide CORRECT code . Because correctness/incorrectness could be identified against some rules. But there is not such rules publicly available. It seems you are the only person who knows these rules.
I fixed the problem with the tests and I think this issue can be closed now.