Some international characters kill RubyYaccLexer
------------------------------------------------

                 Key: JRUBY-1189
                 URL: http://jira.codehaus.org/browse/JRUBY-1189
             Project: JRuby
          Issue Type: Bug
          Components: Parser
    Affects Versions: JRuby 1.0.0
         Environment: Windows Vista, JDK 1.6
            Reporter: Chris Williams


In RDT/RadRails we pass down the text of an open editor to the lexer/parser for 
a few processes like syntax coloring/partitioning and code analysis.

Users are reporting some errors when typing in characters like the British 
pound symbol. The Parser is throwing an unchecked runtime exception trying to 
parse the character as an integer to formulate a SyntaxException. This is on 
line 1411 of RubyYaccLexer.

I'm not sure if the character should be valid or not, but at the very least I'd 
hope for better behavior in handling it.

Ideally the code would wrap the call to Integer.parseInt(String str, int radix) 
in a try/catch, or it would use some other method that doesn't throw exceptions 
(but could return weird answers), like Character.digit(char ch, int radix).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to