[MLton] mlb path maps ... and spaces
Wesley W. Terpstra
wesley at terpstra.ca
Sat Sep 6 01:38:46 PDT 2008
On Sat, Sep 6, 2008 at 12:46 AM, Matthew Fluet <fluet at tti-c.org> wrote:
> I would make the syntax for an mlb-path-map path the same as an mlb path:
>
> Paths may include path variables and are expanded according to a path
> map. Unquoted paths may include alpha-numeric characters and the
> symbols "-" and "_", along with the arc separator "/" and extension
> separator ".". More complicated paths, including paths with spaces, may
> be included by quoting the path with ". A quoted path is lexed as an SML
> string constant.
>
> That is, if we let [[:file:]] denote the epoynmous regexp from
> <src>/front-end/mlb.lex and let [[:smlstring:]] be a regexp for SML string
> constants, then an mlb-path-map entry line could be taken by the regexp:
>
>
> ^[[:space:]]*\([A-Z_][A-Z0-9_]*\)[[:space:]]+\([[:file:]]\|[[:smlstring:]]\)[[:space:]]$
This does seem better than my proposal.
It would probably be useful to allow comments in a mlb-path-map file.
>
As normal SML-style comments then?
Of course, it turns the 3-line code there is now into yet another lexer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton/attachments/20080906/3cc873d7/attachment.htm
More information about the MLton
mailing list