First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 133176
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Leonardo Boshell <leonardop@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Erik <esigra@gmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ada_identifiers_fix_partial-1.diff Fix for the first part of the problem. patch Erik 2006-05-13 01:13 0000 580 bytes Details | Diff
ada_identifiers_fix_partial-1.diff Patch that fixes the first part of the problem. patch Erik 2006-05-13 10:03 0000 767 bytes Details | Diff
ada_identifiers_fix-2.diff Patch that fixes the problem for me if I have LANG set to swedish. patch Erik 2006-05-14 04:41 0000 1.59 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 133176 depends on: Show dependency tree
Show dependency graph
Bug 133176 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-13 01:12 0000
Upstream bug report at:
https://sourceforge.net/tracker/index.php?func=detail&aid=1487803&group_id=2902&atid=102902

Ada identifiers are not correctly recognized. 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

------- Comment #1 From Erik 2006-05-13 01:12:13 0000 -------
Upstream bug report at:
https://sourceforge.net/tracker/index.php?func=detail&aid=1487803&group_id=2902&atid=102902

Ada identifiers are not correctly recognized. 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.

------- Comment #2 From Erik 2006-05-13 01:13:30 0000 -------
Created an attachment (id=86687) [edit]
Fix for the first part of the problem.

------- Comment #3 From Erik 2006-05-13 10:03:27 0000 -------
Created an attachment (id=86708) [edit]
Patch that fixes the first part of the problem.

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 "&aring;".

------- Comment #4 From Erik 2006-05-14 04:40:37 0000 -------
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.

------- Comment #5 From Erik 2006-05-14 04:41:34 0000 -------
Created an attachment (id=86744) [edit]
Patch that fixes the problem for me if I have LANG set to swedish.

------- Comment #6 From Leonardo Boshell 2006-05-17 13:45:26 0000 -------
Thanks, committed for code2html-0.9.1-r1.

First Last Prev Next    No search results available      Search page      Enter new bug