# Running Mythryl-Yacc from makelib.
#
# (C) 1999 Lucent Technologies, Bell Laboratories
#
# Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
# Compiled by:
#
src/app/makelib/tools/mlyacc/mlyacc-tool.libpackage yacc_tool {
stipulate
tool = "Mythryl-Yacc";
api_options_keyword = "api_options";
pkg_options_keyword = "pkg_options";
keywords
=
[api_options_keyword, pkg_options_keyword];
# This is a bit clumsy because we call parse_options twice.
# However, this is not really such a big deal in practice...
#
fun get keyword NULL
=>
NULL;
get keyword (THE tool_options)
=>
.matches
(tools::parse_options { tool, keywords, tool_options } )
keyword;
end;
herein
# tools_g def in
src/app/makelib/tools/main/tools-g.pkg my _ =
tools::note_standard_shell_command_tool
{
tool,
ilk => "mlyacc",
suffixes => ["grammar"],
template => NULL,
command_standard_path
=>
\\ () = ("bin/mythryl-yacc", []), # (command_path, shell_options). XXX BUGGO FIXME Make this a record, not tuple.
extension_style
=> # ilk Tooloptcvt
tools::EXTEND [ ("api", THE "sml", get api_options_keyword),
("pkg", THE "sml", get pkg_options_keyword)
],
dflopts => []
};
end;
};