Mercury Bugs - mercury
View Issue Details
0000319mercuryBugpublic2014-02-15 21:012014-02-25 12:16
Reportersebgod 
Assigned Topbone 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSDebianOS VersionWheezy 7.x
Product Version 
Target VersionFixed in Version 
Summary0000319: lex_demo in extras/lex/samples fails to start
Descriptionrunning the lex_demo yields:

Uncaught Mercury exceptiopn:
Software Error: string.unsafe_index: illegal sequence.

The fault is due to the anybut/1 clause in lex.m:730
0x01 `..` 0xff
Using this range will raise the mentioned exception.
Steps To Reproduce* checkout master branch
* build+install liblex
* build+run lex_demo
Additional InformationThe applied patch fixes the problem,
but the resulting code will only parse ASCII characters (the nonpatched code would have parsed only ISO-Latin characters, not the full Unicode range)

TagsNo tags attached.
Attached Filesdiff lex.diff (384) 2014-02-15 21:01
https://bugs.mercurylang.org/file_download.php?file_id=204&type=bug

Notes
(0000651)
sebgod   
2014-02-25 08:11   
Can be closed since lex.m is fixed in the master branch:
https://github.com/Mercury-Language/mercury/commit/8c5a350c4205bd6b08360e2c27667c6fdd7e0a21
(0000652)
pbone   
2014-02-25 12:16   
Thank you Sebastien for your patches.

Issue History
2014-02-15 21:01sebgodNew Issue
2014-02-15 21:01sebgodFile Added: lex.diff
2014-02-25 08:11sebgodNote Added: 0000651
2014-02-25 12:16pboneNote Added: 0000652
2014-02-25 12:16pboneStatusnew => closed
2014-02-25 12:16pboneAssigned To => pbone
2014-02-25 12:16pboneResolutionopen => fixed