[jira] [Updated] (NETBEANS-4540) SyntaxException for specific grammar

2021-08-14 Thread Jira


 [ 
https://issues.apache.org/jira/browse/NETBEANS-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Bläsing updated NETBEANS-4540:
---
Description: 
tWhen I use this grammar file: 
https://github.com/James-Yu/LaTeX-Workshop/blob/master/syntax/LaTeX.tmLanguage.json
 for tex files, I got an SyntaxException fot the attached file (example.tex)

{code}
org.joni.exception.SyntaxException: premature end of char-class
at org.joni.ScannerSupport.newSyntaxException(ScannerSupport.java:166)
at org.joni.Parser.parseCharClass(Parser.java:342)
at org.joni.Parser.parseCharClass(Parser.java:318)
at org.joni.Parser.parseExp(Parser.java:892)
at org.joni.Parser.parseBranch(Parser.java:1116)
at org.joni.Parser.parseSubExp(Parser.java:1133)
at org.joni.Parser.parseRegexp(Parser.java:1166)
at org.joni.Parser.parse(Parser.java:65)
at org.joni.Analyser.compile(Analyser.java:80)
at org.joni.Regex.(Regex.java:159)
at org.joni.Regex.(Regex.java:136)
at 
org.eclipse.tm4e.core.internal.oniguruma.OnigRegExp.(OnigRegExp.java:49)
at 
org.eclipse.tm4e.core.internal.oniguruma.OnigSearcher.(OnigSearcher.java:29)
at 
org.eclipse.tm4e.core.internal.oniguruma.OnigScanner.(OnigScanner.java:24)
at 
org.eclipse.tm4e.core.internal.rule.RegExpSourceList.createOnigScanner(RegExpSourceList.java:132)
at 
org.eclipse.tm4e.core.internal.rule.RegExpSourceList.compile(RegExpSourceList.java:86)
at 
org.eclipse.tm4e.core.internal.rule.BeginEndRule.compile(BeginEndRule.java:77)
at 
org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRule(LineTokenizer.java:276)
at 
org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRuleOrInjections(LineTokenizer.java:299)
at 
org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scanNext(LineTokenizer.java:110)
at 
org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scan(LineTokenizer.java:97)
at 
org.eclipse.tm4e.core.internal.grammar.LineTokenizer._tokenizeString(LineTokenizer.java:537)
at 
org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:239)
at 
org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
at 
org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
at 
org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
at 
org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
at 
org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
at 
org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
at 
org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
at 
org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
at 
org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
at 
org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
at 
org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
at 
org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
at 
org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
at 
org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
at 
org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
at 
org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:699)
at 
org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:660)
at 
org.netbeans.modules.editor.lib2.view.ViewUpdates.reinitAllViews(ViewUpdates.java:189)
at 
org.netbeans.modules.editor.lib2.view.DocumentViewOp.checkViewsInited(DocumentViewOp.java:619)
at 
org.netbeans.modules.editor.lib2.view.DocumentView.getPreferredSpan(DocumentView.java:226)
at 
java.desktop/javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1452)
at 
java.desktop/javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:957)
at 
java.desktop/javax.swing.JComponent.getPreferredSize(JComponent.java:1680)
at 
java.desktop/javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1345)
at 
org.netbeans.modules.editor.NbEditorUI$LayeredEditorPane.getPreferredS

[jira] [Updated] (NETBEANS-4540) SyntaxException for specific grammar

2021-07-28 Thread Christian Lenz (Jira)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Lenz updated NETBEANS-4540:
-
Affects Version/s: 12.4

> SyntaxException for specific grammar
> 
>
> Key: NETBEANS-4540
> URL: https://issues.apache.org/jira/browse/NETBEANS-4540
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0, 12.4
> Environment: Product Version: Apache NetBeans IDE 12.0
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
> Attachments: example.jl, example.tex
>
>
> When I use this grammar file: 
> https://github.com/James-Yu/LaTeX-Workshop/blob/master/syntax/LaTeX.tmLanguage.json
>  for tex files, I got an SyntaxException fot the attached file (example.tex)
> {code}
> org.joni.exception.SyntaxException: premature end of char-class
>   at org.joni.ScannerSupport.newSyntaxException(ScannerSupport.java:166)
>   at org.joni.Parser.parseCharClass(Parser.java:342)
>   at org.joni.Parser.parseCharClass(Parser.java:318)
>   at org.joni.Parser.parseExp(Parser.java:892)
>   at org.joni.Parser.parseBranch(Parser.java:1116)
>   at org.joni.Parser.parseSubExp(Parser.java:1133)
>   at org.joni.Parser.parseRegexp(Parser.java:1166)
>   at org.joni.Parser.parse(Parser.java:65)
>   at org.joni.Analyser.compile(Analyser.java:80)
>   at org.joni.Regex.(Regex.java:159)
>   at org.joni.Regex.(Regex.java:136)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigRegExp.(OnigRegExp.java:49)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigSearcher.(OnigSearcher.java:29)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigScanner.(OnigScanner.java:24)
>   at 
> org.eclipse.tm4e.core.internal.rule.RegExpSourceList.createOnigScanner(RegExpSourceList.java:132)
>   at 
> org.eclipse.tm4e.core.internal.rule.RegExpSourceList.compile(RegExpSourceList.java:86)
>   at 
> org.eclipse.tm4e.core.internal.rule.BeginEndRule.compile(BeginEndRule.java:77)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRule(LineTokenizer.java:276)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRuleOrInjections(LineTokenizer.java:299)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scanNext(LineTokenizer.java:110)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scan(LineTokenizer.java:97)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer._tokenizeString(LineTokenizer.java:537)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:239)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
>   at 
> org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
>   at 
> org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
>   at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
>   at 
> org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
>   at 
> org.netbeans.modules.editor.lib2.view

[jira] [Updated] (NETBEANS-4540) SyntaxException for specific grammar

2020-07-11 Thread Christian Lenz (Jira)


 [ 
https://issues.apache.org/jira/browse/NETBEANS-4540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Lenz updated NETBEANS-4540:
-
Attachment: example.jl

> SyntaxException for specific grammar
> 
>
> Key: NETBEANS-4540
> URL: https://issues.apache.org/jira/browse/NETBEANS-4540
> Project: NetBeans
>  Issue Type: Bug
>  Components: textmate-lexer
>Affects Versions: 12.0
> Environment: Product Version: Apache NetBeans IDE 12.0
> Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
> Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.0
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.0
>Reporter: Christian Lenz
>Assignee: Jan Lahoda
>Priority: Major
> Attachments: example.jl, example.tex
>
>
> When I use this grammar file: 
> https://github.com/James-Yu/LaTeX-Workshop/blob/master/syntax/LaTeX.tmLanguage.json
>  for tex files, I got an SyntaxException fot the attached file (example.tex)
> {code}
> org.joni.exception.SyntaxException: premature end of char-class
>   at org.joni.ScannerSupport.newSyntaxException(ScannerSupport.java:166)
>   at org.joni.Parser.parseCharClass(Parser.java:342)
>   at org.joni.Parser.parseCharClass(Parser.java:318)
>   at org.joni.Parser.parseExp(Parser.java:892)
>   at org.joni.Parser.parseBranch(Parser.java:1116)
>   at org.joni.Parser.parseSubExp(Parser.java:1133)
>   at org.joni.Parser.parseRegexp(Parser.java:1166)
>   at org.joni.Parser.parse(Parser.java:65)
>   at org.joni.Analyser.compile(Analyser.java:80)
>   at org.joni.Regex.(Regex.java:159)
>   at org.joni.Regex.(Regex.java:136)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigRegExp.(OnigRegExp.java:49)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigSearcher.(OnigSearcher.java:29)
>   at 
> org.eclipse.tm4e.core.internal.oniguruma.OnigScanner.(OnigScanner.java:24)
>   at 
> org.eclipse.tm4e.core.internal.rule.RegExpSourceList.createOnigScanner(RegExpSourceList.java:132)
>   at 
> org.eclipse.tm4e.core.internal.rule.RegExpSourceList.compile(RegExpSourceList.java:86)
>   at 
> org.eclipse.tm4e.core.internal.rule.BeginEndRule.compile(BeginEndRule.java:77)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRule(LineTokenizer.java:276)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.matchRuleOrInjections(LineTokenizer.java:299)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scanNext(LineTokenizer.java:110)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer.scan(LineTokenizer.java:97)
>   at 
> org.eclipse.tm4e.core.internal.grammar.LineTokenizer._tokenizeString(LineTokenizer.java:537)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar._tokenize(Grammar.java:239)
>   at 
> org.eclipse.tm4e.core.internal.grammar.Grammar.tokenizeLine(Grammar.java:191)
>   at 
> org.netbeans.modules.textmate.lexer.TextmateLexer.nextToken(TextmateLexer.java:75)
>   at 
> org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:191)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbeddingImpl(IncTokenList.java:170)
>   at 
> org.netbeans.lib.lexer.inc.IncTokenList.tokenOrEmbedding(IncTokenList.java:165)
>   at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:463)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$TSInfo.moveNextToken(SyntaxHighlighting.java:779)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:476)
>   at 
> org.netbeans.modules.textmate.lexer.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:405)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:600)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:337)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:303)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:234)
>   at 
> org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:59)
>   at 
> org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:168)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1299)
>   at 
> org.netbeans.modules.editor.lib2.view.ViewBu