D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15901 - Perfect hash map for the visual D lexer
Summary: Perfect hash map for the visual D lexer
Status: RESOLVED LATER
Alias: None
Product: D
Classification: Unclassified
Component: visuald (show other issues)
Version: D2
Hardware: All Windows
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-09 07:21 UTC by basile-z
Modified: 2016-04-29 03:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description basile-z 2016-04-09 07:21:37 UTC
I can provide a perfect hash map for the visual D lexer (https://github.com/D-Programming-Language/visuald/blob/master/vdc/lexer.d).

It would be quite similar to this one:

https://github.com/BBasile/d2kw/blob/master/src/d2kw.d

but with the keywords list as defined in VisualD. Maybe 256 will be a bit hard to generate but 384 or 512 will be OK. 512 is fine for a slightly faster hash.

Reply or contact me if you're interested.