next up previous contents
Next: 6.2.2 ML-Lex Up: 6.2 Built-in tools Previous: 6.2 Built-in tools   Contents

6.2.1 ML-Yacc

The ML-Yacc tool is responsible for files that are input to the ML-Yacc parser generator. Its class name is mlyacc. Recognized file name suffixes are .grm and .y. For a source file $f$, the tool produces two targets $f$ .sig and $f$ .sml, both of which are always treated as ML source files. The mlyacc class accepts two optional tool parameters labeled sigoptions and smloptions. They specify tool options to be passed on to the generated .sig- and .sml-files, respectively. Example8:


  lang.grm (sigoptions:(setup:(pre:"print \"compiling lang.grm.sig\\n\";"))
            smloptions:(private))

The tool invokes the ml-yacc command if the targets are ``outdated''. A target is outdated if it is missing or older than the source. Unless anchored using the path anchor mechanism (see Section 3.3), the command ml-yacc will be located using the operating system's path search mechanism (e.g., the $PATH environment variable).



Matthias Blume
2001-07-19