From: Petra M. <pe...@cs...> - 2004-02-16 21:27:40
|
Hi Tim, thanks for providing this nice parser :-) Mark suggested to use my scanner together with your parser. I had a short look at your token names and was very happy to find out that most of the token names are equal. However, there are still a few things I am not sure how to handle: - DELTA (one of your tokens) is not defined as a symbolic keyword in the Z standard. Do you need that at all? Should I change my scanner to recognice that token as well? - ZSECTION (one of your tokens): What is the difference between ZSECTION and SECTION? Is ZSECTION an alphabetic keyword as well? Is it an OZ keyword? - NUMSTROKE, NEXTSTROKE, OUTSTROKE, and INSTROKE (some of your tokens) are handled equally by my scanner. My scanner returns the STROKE token, which is a String, and it is left to the parser to figure out which kind of stroke it is. I guess it is quite easy to change the scanner to return the four different kinds of strokes ... but if we want to stay as close to the standard as possible we should go for STROKE. - GENSCH (one of my tokens): I couldn't find the corresponding token in you parser. Is it GCH? Since the name GENSCH is used in the standard I would like to use that name as well (makes it easier for others to read the code). - the following tokens are probably OZ tokens (could you please check whether I am right): CLASS, STATE, INIT, INITWORD, OPSCH, VISIBILITY, INHERITS, DCNJ, DGCH, DSQC, PARALLEL, ASSOCPARALLEL, GCH, CLASSCOM, ENDCLASSCOM, CLASSCOMWORD, DECLWORD, BOXNAME I don't know how to change my scanner to recognice these tokens. Where can I learn about the unicode characters in OZ? - _APPLICATION, _RENAME (some of your tokens) I have got no idea what those are good for. I guess my scanner doesn't have to worry about those since these are used internally? By the way, do you know whether it is possible to connect one scanner to different parsers? I am worried about the sym.java class generated by the cup parser. The scanner usually needs the sym.java class, but since I've got several of them there remains the question which one should the scanner use? Regargs, Petra |