SR pseudo language parser
Recent additions and updates
Date: 07/24/97
Date: 07/21/97
- Some minor bugs were fixed in report.c and
rep.y.
- New project file for Borland C 3.1 compiler.
- getopt.c was corrected.
When MSDOS is defined it should include the io.h.
Date: 07/16/97
Date: 07/11/97
Date: 07/09/97
Date: 07/04/97
Date: 07/03/97
Files:
- Makefile = Makefile for compilling.
- dorep.prj = Project file for BC 3.1 compiler.
- dorep.c = Simple C source of the main program.
- report.c = C source code to open, close and list the report.
- report.h = C header file for report.c
- rep.y = bison input file.
Invoke: bison -prep -d -orep_tab.c rep.y
- rep_tab.c = C source code generated by bison.
- rep_tab.h = C header file generated by bison.
- rep.l = flex input file.
Invoke: flex -Prep -L -olexrep.c rep.l
- lexrep.c = C source code generated by flex.
- dstrbuf.c = dynamically allocated string buffer C source code.
- dstrbuf.h = dynamically allocated string buffer C header file.
- getopt.c = C source for arguments
- getopt.h = C header for getopt.c
- cor_lang.txt = text file, correction of the original pseudo language gramar.
- cor_typo.txt = text file, correction of typographical errors
- rules.txt = text file, rules of the pseudo lang. gramar.
- struct.doc = win word 6.0 file, SR structures
in the memory for better understanding. How does the structure look like in
the memory. It is advised to look with structure definitions (report.h).
- test1.rep = text file, example 1
- test2.rep = text file, example 2
- test3.rep = text file, example 3
- test4.rep = text file, example 4
- test5.rep = text file, example 5
- test6.rep = text file, example 6
You can down load the files in one block:
Last updated: 07/24/97
How can you compile it?
The Makefile use the gcc GNU C compiler. You can change it in this file.
Note: I compiled it on SunOS 5.5 and SunOS Release 4.1.4 with gcc.
You would be able to compile it on several platforms without problem.
If you have question, please do not hesitate to make
contact with me!
Limitations:
- <text> comments can not contain the '<' and '>' characters.
- values should be enclosed between '"' characters.
- If you repeat the CID and CID value n times after '=' sign, then
the CID value will be stored n times in the structure.
You should select the right one.
- This parser does not support the CV, MR, MRV, CSD, TID and CM clause
because I don't know what kind of data these are.
/*value enclosed between '"', CID is a number.*/
- values characters are limited. "a-zA-Z," and white space. But it is easy to
modify in rep.l file.
- I did not make differences between Attributes. (e.g. Series Attributes,
Common Attributes ...) You can write a function to verify the attributes in the
structure. You need a database what stores the appropriate Attributes.
But in the SR document the tables sometimes ambiguous at the moment.
- This implementation does not support the imrecision delimiters. I can feed
it with lexical parser, but some problem will come up then.
Aknowledgements
I would like to thank Prof. Andrew Todd-Pokropek (University College London),
Attila Kuba and László Nyúl
(József Attila University) for their help.
This work was aided by Hungarian State Eötvös Scholarship.
All comments are welcome.
Last modified: 08/04/97
Your visitor number is
.