Menu

#210 Parser Exception on spanish character in identifier

open
Parser (97)
9
2009-05-14
2009-05-14
TridenT
No

the following declaration throw a parser exception :
var años : integer;

The spanish character is the problem in the identifier "años".
---------------------------------------------------------------
Tested with JCF v2.43
Exception TEParseError Unexpected token, expected ":"
Near Unknown ñ at line 6 col 4

Discussion

  • TridenT

    TridenT - 2009-05-14

    Test file to reproduce the exception

     
  • TridenT

    TridenT - 2009-05-14

    Priority raised as it is a parser exception.

     
  • TridenT

    TridenT - 2009-05-14
    • priority: 5 --> 9
     
  • Anonymous

    Anonymous - 2011-04-22

    try to modify JcfUnicode.pas, function WideCharIsWordChar:

    function WideCharIsWordChar(const wc: WideChar): Boolean;
    var
    ch: char;
    begin
    if IsCharAlphaW(wc) then //qlg 2010-08-17
    Result := True //qlg 2010-08-17
    else
    begin
    if WideCharIsHigh(wc) then
    begin
    Result := False;
    exit;
    end;

    ch := char(wc);
    Result := CharIsAlpha(ch) or (ch = '_');
    end;
    end;

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.