| Anonymous | Login | Signup for a new account | 2013-06-18 22:55 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0003195 | OCaml | OCaml general | public | 2004-09-30 20:20 | 2004-10-06 11:42 | ||||||
| Reporter | administrator | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | |||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0003195: ocamllex, FEATURE WISH | ||||||||||
| Description | Full_Name: Per Larsson Version: 3.08 OS: linux Submission from: 1-1-8-41a.ens.sth.bostream.se (82.182.158.5) The inclusion of the character set difference operator (#) was a nice extension to ocamllex syntax. Now there remains to handle character set union! For an illustration of the problem, consider the following example: let lower = ['\097'-'\122' '\181' '\223'-'\246' '\248'-'\255'] let upper = ['\065'-'\090' '\192'-'\214' '\216'-'\222'] let graph = ['\033'-'\126' '\160'-'\255'] let alpha = lower | upper ... Now you can't define a character set let punct = graph # alnum INVALID!! The reason is that the character set property is defined syntactically and therefore excludeds 'alpha'. There seems to be at least two easy solutions to the problem: (1) Let (a | b) be a character set if a and b is (2) Extend the [...] [^ ...] contexts to include items which are themselves (names of) character sets, i.e. you should be allowed to write character sets in the style: let alpha = [lower upper] let print = [^ cntrl] let alnum = [alpha '\048'-'\057'] (IMHO, this second extension seems to be very natural and could be considered even if the # operator hadn't accentuated the need. This is also the solution in "ALEX" a lexer generator for haskell.) Best regards Per Larsson | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| Copyright © 2000 - 2011 MantisBT Group |