Menu

#12 Ada identifiers not detected (partial fix included)

open
nobody
None
5
2006-05-13
2006-05-13
Erik Sigra
No

Ada identifiers are not correctly detected. The first
problem is that it detects words like A__B and B_ as
Ada identifiers, which they are not. The second
problem is that it does not detect words like Täthet
and Anlaß as identifiers, which they are.

Discussion

  • Erik Sigra

    Erik Sigra - 2006-05-13

    Logged In: YES
    user_id=31104

    After getting some help at
    http://www.nntp.perl.org/group/perl.beginners/83569 I have
    modified the partial fix:
    * use character class [:alpha:]
    * use more compact and clever character class [^\W_]
    * use the non-capturing group (?:)

    The second problem is more complicated. Perl expects input
    in UTF-8 encoding. Since Ada sourcecode is in latin1
    (comments can be in any encoding), an input layer is
    needed. An output layer is probably also needed, since HTML
    should have things like "å".

     
  • Erik Sigra

    Erik Sigra - 2006-05-14

    Logged In: YES
    user_id=31104

    Now I finally made a patch that fixes all the problem cases
    for me. It adds "use locale;". I also added character set
    headers to the HTML templates. I had to make sure that LANG
    is set to swedish in the shell where I run code2html to
    make it work.

     
  • Erik Sigra

    Erik Sigra - 2006-05-14

    Patch that fixes the problem for me if I have LANG set to swedish.

     

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.