On 15/03/2012, at 10:25 PM, john skaller wrote: > This is a brief note in which I talk to myself and any lurkers out there > about user defined literals. >
The current status is: all literals are now in user space. There are a couple of non-literal uses that remain to be fixed: type x = c"..."; is a non-templating (non-polymorphic) version of type x = "..."; Both these use strings, but they're not literals: literals are constant expression values. Ditto for pattern matches: they use the same lexicology but the use in match x with | "string" => ... is a pattern string, not a literal. So there are a couple more cases to finalise tonight AEST, then identifiers need to be done, and a couple of tweeks and the lift will be well under way. Other things to lift include comments: at the moment Felix has a fixed idea of a comment, either a /* C comment which can /* be nested */ or not */ or a // C++ comment ending at line end. If we were parsing Ocaml we'd want (* *) nestables instead, and if it's Scheme then ; is the comment character, etc etc. One advantage of all this is it may allow for adding documentation in nicer way that "publish" or "comment" or just using Felix comments. No idea. There are a couple of other meta-things I want to do. One is a system similar to the resource manager, only for licences. The idea is you can say: copyright Fred 2011 licence LGPL; and something similar for C stuff (probably add licence info into the *.fpc files). Then you can get licence information about your program. For example you can say flx --licence=FFAU and you'll get a warning if you use any non-FFAU licences like GPL or LGPL. Similarly you might do: flx --os=Win and you get a warning if you use any Posix code. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language