equal
deleted
inserted
replaced
339 val set_preproc = Preprocessor.map o K |
339 val set_preproc = Preprocessor.map o K |
340 |
340 |
341 |
341 |
342 |
342 |
343 local |
343 local |
344 structure P = OuterParse and K = OuterKeyword |
344 val option_parser = Parse.group "option" |
345 |
345 ((Parse.reserved "sequential" >> K Sequential) |
346 val option_parser = P.group "option" |
346 || ((Parse.reserved "default" |-- Parse.term) >> Default) |
347 ((P.reserved "sequential" >> K Sequential) |
347 || (Parse.reserved "domintros" >> K DomIntros) |
348 || ((P.reserved "default" |-- P.term) >> Default) |
348 || (Parse.reserved "no_partials" >> K No_Partials) |
349 || (P.reserved "domintros" >> K DomIntros) |
349 || (Parse.reserved "tailrec" >> K Tailrec)) |
350 || (P.reserved "no_partials" >> K No_Partials) |
|
351 || (P.reserved "tailrec" >> K Tailrec)) |
|
352 |
350 |
353 fun config_parser default = |
351 fun config_parser default = |
354 (Scan.optional (P.$$$ "(" |-- P.!!! (P.list1 option_parser) --| P.$$$ ")") []) |
352 (Scan.optional (Parse.$$$ "(" |-- Parse.!!! (Parse.list1 option_parser) --| Parse.$$$ ")") []) |
355 >> (fn opts => fold apply_opt opts default) |
353 >> (fn opts => fold apply_opt opts default) |
356 in |
354 in |
357 fun function_parser default_cfg = |
355 fun function_parser default_cfg = |
358 config_parser default_cfg -- P.fixes -- Parse_Spec.where_alt_specs |
356 config_parser default_cfg -- Parse.fixes -- Parse_Spec.where_alt_specs |
359 end |
357 end |
360 |
358 |
361 |
359 |
362 end |
360 end |
363 end |
361 end |