From: nelis <nel...@cs...> - 2007-11-07 13:22:25
|
Tim Miller schreef: > nelis wrote: > >> I want to define something like: >> >> \begin{schema}{SUBSTRUCTURE}\\ >> components : \power COMPONENT \\ >> connectors : \power CONNECTORS \\ >> links : \power LINKS \\ >> interfaceMappings : \power INTERFACEMAPPING >> \end{schema} >> >> \begin{schema}{COMPONENT}\\ >> identifier : IDENTIFIER \\ >> description : TEXT \\ >> interfaces : \power INTERFACE \\ >> subStructure : SUBSTRUCTURE >> \end{schema} >> >> But I get the follow problem: the typechecker seems unable to handle a >> schema definition that relies on a schema that is specified further in >> the document. Like in the example, Substructure can not rely on the >> definition of component. >> >> > Just as a note, the above is not permitted by Z. The scope of the > schema SUBSTRUCTURE is restricted only to the paragraphs that have > been declared before it; that is, Z does not permit use before > declaration, except in the special case of recursive given types. > > However! ... I have implemented the CZT typechecker such that it > allows users to turn on use before declaration. I'm not sure how > to turn this on from the jedit plugin (I don't use that particular > plugin -- someone else on the project may be able to answer that), > but for now, the easiest way is if you change the file extension > of your specifications to .oz (e.g. from file.tex to file.oz). > Then the jedit plugin will automatically use the Object-Z > typechecker, which has use before declaration enabled by default, > and the above should then typecheck without problems. > > Cheers, > Tim > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > CZT-Users mailing list > CZT...@li... > https://lists.sourceforge.net/lists/listinfo/czt-users > Dear Tim, Thank you for your quick answer. Alas this does not seem to work. I changed the extension of the file, and it still refuses to accept this definition. I think JEdit is correctly using the Object-z parser (since it mentions the parser in the status bar when it is finished). Questions: 1. Is there anybody with experience in JEdit who could help me getting it to work? 2. Are there constructs that only exist in Object-z so that I can test that it effectively uses the Object-z parser? 3. If you don't use this JEdit plugin, how do you specify your Z documents in a practical way? Kind regards, Nelis |