equal
deleted
inserted
replaced
74 private val PREFS_DIR = Path.explode("$ISABELLE_HOME_USER/etc") |
74 private val PREFS_DIR = Path.explode("$ISABELLE_HOME_USER/etc") |
75 private val PREFS = PREFS_DIR + Path.basic("preferences") |
75 private val PREFS = PREFS_DIR + Path.basic("preferences") |
76 |
76 |
77 lazy val options_syntax = |
77 lazy val options_syntax = |
78 Outer_Syntax.init() + ":" + "=" + "--" + |
78 Outer_Syntax.init() + ":" + "=" + "--" + |
79 (SECTION, Keyword.DOCUMENT_HEADING) + (PUBLIC, Keyword.THY_DECL) + (OPTION, Keyword.THY_DECL) |
79 (SECTION, Keyword.DOCUMENT_HEADING) + PUBLIC + (OPTION, Keyword.THY_DECL) |
80 |
80 |
81 lazy val prefs_syntax = Outer_Syntax.init() + "=" |
81 lazy val prefs_syntax = Outer_Syntax.init() + "=" |
82 |
82 |
83 object Parser extends Parse.Parser |
83 object Parser extends Parse.Parser |
84 { |
84 { |
91 |
91 |
92 val option_entry: Parser[Options => Options] = |
92 val option_entry: Parser[Options => Options] = |
93 { |
93 { |
94 command(SECTION) ~! text ^^ |
94 command(SECTION) ~! text ^^ |
95 { case _ ~ a => (options: Options) => options.set_section(a) } | |
95 { case _ ~ a => (options: Options) => options.set_section(a) } | |
96 opt(command(PUBLIC)) ~ command(OPTION) ~! (position(option_name) ~ $$$(":") ~ option_type ~ |
96 opt($$$(PUBLIC)) ~ command(OPTION) ~! (position(option_name) ~ $$$(":") ~ option_type ~ |
97 $$$("=") ~ option_value ~ ($$$("--") ~! text ^^ { case _ ~ x => x } | success(""))) ^^ |
97 $$$("=") ~ option_value ~ ($$$("--") ~! text ^^ { case _ ~ x => x } | success(""))) ^^ |
98 { case a ~ _ ~ ((b, pos) ~ _ ~ c ~ _ ~ d ~ e) => |
98 { case a ~ _ ~ ((b, pos) ~ _ ~ c ~ _ ~ d ~ e) => |
99 (options: Options) => options.declare(a.isDefined, pos, b, c, d, e) } |
99 (options: Options) => options.declare(a.isDefined, pos, b, c, d, e) } |
100 } |
100 } |
101 |
101 |