[antlr-interest] Antlrworks BUG? --- Do I note bugs here?

Edwards, Waverly Waverly.Edwards at genesys.com
Mon Aug 27 03:29:29 PDT 2007


 
I didn't know those characters were unicode characters.  I thought they
were in the upper part of the ascii set.

Thank you for the response.


W.


Oh, how wise is it to allow such characters a synonyms for quote marks?

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Johannes Luber
Sent: Monday, August 27, 2007 5:52 AM
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Antlrworks BUG? --- Do I note bugs here?

Edwards, Waverly wrote:
> 
> This doesn't seem to translate well into email but the use of the 
> curly quote characters ( not the double quote ) but the ones like you 
> would generate in MS Word generates an error in Antlrworks.
> 
> 
> fragment
> QuoteChar     : ('"'|'"'|'"') ;
> // allowable quote characters. 
> //Am I doing anyone favors by allowing all these characters?
> 
> 
> Interestingly enough even if I comment out the offending lines the 
> errors are still generated.  A grammar check gives me a "sucessful"
> dialog but I still get the below errors.
> 
> Shouldn't I be able to use the curly quotes?  Is this a bug?
> 
> Maybe a better question, should I allow the user to use curly quotes?
> 
> Is this the correct place to note such issues?
> 
> 
> W.
> 

Yes, it is the correct place for bug reports, but this isn't a bug.
ANTLR can only process ASCII characters, not Unicode, until version 3.1.
The reason is that the 3.0 series uses the old 2.7.7 ANTLR to parse
grammars and the old version was limited in the input range, even if the
offending characters are in comments (something, which should change in
3.1). A workaround is to find the Unicode value for the offending
characters and employ the '\uXXXX' syntax.

Best regards,
Johannes Luber

> [19:55:56] Checking Grammar...
> [19:55:56] HEX_OCT_BIN.g:87:24: expecting '*', found '''
>         at org.antlr.tool.ANTLRLexer.nextToken(ANTLRLexer.java:321)
>         at
>
antlr.TokenStreamRewriteEngine.nextToken(TokenStreamRewriteEngine.java:1
61)
>         at antlr.TokenBuffer.fill(TokenBuffer.java:69)
>         at antlr.TokenBuffer.LA(TokenBuffer.java:80)
>         at antlr.LLkParser.LA(LLkParser.java:52)
>         at org.antlr.tool.ANTLRParser.altList(ANTLRParser.java:1464)
>         at org.antlr.tool.ANTLRParser.rule(ANTLRParser.java:1236)
>         at org.antlr.tool.ANTLRParser.rules(ANTLRParser.java:655)
>         at org.antlr.tool.ANTLRParser.grammar(ANTLRParser.java:389)
>         at org.antlr.tool.Grammar.setGrammarContent(Grammar.java:521)
>         at org.antlr.tool.Grammar.setGrammarContent(Grammar.java:497)
>         at
> org.antlr.works.grammar.EngineGrammar.createNewGrammar(Unknown Source)
>         at
> org.antlr.works.grammar.EngineGrammar.createCombinedGrammar(Unknown
Source)
>         at 
> org.antlr.works.grammar.EngineGrammar.createGrammars(Unknown
> Source)
>         at org.antlr.works.grammar.EngineGrammar.analyze(Unknown
Source)
>         at org.antlr.works.grammar.CheckGrammar.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> 
> [19:55:56] HEX_OCT_BIN.g:87:24: expecting '*', found '''
>         at org.antlr.tool.ANTLRLexer.nextToken(ANTLRLexer.java:321)
>         at
>
antlr.TokenStreamRewriteEngine.nextToken(TokenStreamRewriteEngine.java:1
61)
>         at antlr.TokenBuffer.fill(TokenBuffer.java:69)
>         at antlr.TokenBuffer.LA(TokenBuffer.java:80)
>         at antlr.LLkParser.LA(LLkParser.java:52)
>         at org.antlr.tool.ANTLRParser.altList(ANTLRParser.java:1464)
>         at org.antlr.tool.ANTLRParser.rule(ANTLRParser.java:1236)
>         at org.antlr.tool.ANTLRParser.rules(ANTLRParser.java:655)
>         at org.antlr.tool.ANTLRParser.grammar(ANTLRParser.java:389)
>         at org.antlr.tool.Grammar.setGrammarContent(Grammar.java:521)
>         at org.antlr.tool.Grammar.setGrammarContent(Grammar.java:497)
>         at
> org.antlr.works.grammar.EngineGrammar.createNewGrammar(Unknown Source)
>         at
> org.antlr.works.grammar.EngineGrammar.createCombinedGrammar(Unknown
Source)
>         at 
> org.antlr.works.grammar.EngineGrammar.createGrammars(Unknown
> Source)
>         at org.antlr.works.grammar.EngineGrammar.analyze(Unknown
Source)
>         at org.antlr.works.grammar.CheckGrammar.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> 



More information about the antlr-interest mailing list