-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathREADME
137 lines (92 loc) · 4.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Coco/R (http://ssw.jku.at/coco/) is a compiler generator, which takes an
attributed grammar of a source language and generates a scanner and a parser
for this language. The scanner works as a deterministic finite automaton.
The parser uses recursive descent. LL(1) conflicts can be resolved by a
multi-symbol lookahead or by semantic checks. Thus the class of accepted
grammars is LL(k) for an arbitrary k.
There is version of Coco/R for Python language.
This is a fork of CocoPy-1.1.0rc (http://pypi.python.org/pypi/CocoPy/) of
Ronald Longo, since it unmaintained.
!!!PLEASE NOTE!!!
This distribution is a release candidate.
Setup and usage information can be found in section 3 of
documentation/CocoDoc.htm. CocoDoc.htm contains everything you need to
use Coco for Python.
This file contains a list of the contents of the distribution and a
development roadmap.
CONTENTS OF THIS DISTRIBUTION
This distribution of Coco includes the following:
Coco root directory
The application files
Coco.py - The main application file
Scanner.py - The lexical analizer for attributed grammars
Parser.py - The parser for attributed grammars
DriverGen.py - Generates the main application
ParserGen.py - Generates the parser
CodeGenerator.py - Common code generation routines
CharClass.py - Implementation of character classes
Errors.py - Tracking and reporting errors in the source grammar
Trace.py - Routines for generating trace files
Core.py - Scanner generator and various support classes.
Other
setup.py - Python distribution utilities setup script for Coco.
setupInfo.py - CocoPy Version information
README.txt - this file.
/documentation
license.txt - The license agreement
CocoDoc.htm - The documentation for CocoPy
howToBootstrap.txt - Instructions on how to bootstrap Coco (outdated)
DataStructurres.pdf- A description of the workings of Coco
pimaker.txt - Documentation of pimaker.
/examples
Various example Attributed Grammars, not all are LL(1).
/frames
The basic Frame files. These are template files used by the code
generation routines.
/sources
These are the source files needed to bootstrap CocoPy.
Coco.atg - The grammar for the Coco language.
Coco.frame - Frame file for Coco's main module.
Parser.frame - Frame file for Coco's parser module.
Scanner.frame - Frame file for Coco's scanner module.
/pimaker (Python Interactive Make utility)
The Python Interactive Make utility written in Coco as a practical
example of Coco usage.
pimaker.atg - The grammar for a makepi.how file.
pimaker.frame - The frame file for pimaker's main module.
pimakerlib.py - Library of routines needed by pimaker.
makepi.how - Pimaker's equivalent to a 'makefile' to bootstrap Coco.
/testSuite
The testbootstrap target in pimaker simply diffs the generated files
coco.py, Parser.py and Scanner.py. If there are no differences,
the test passes. However, when modifications are made to Coco.py
this sort of testing is not sufficient.
The suite of tests is in this directory are ported for the C#
implementation of Coco/R. They test Coco/R features. To run the
test suite open a command shell into the testSuite folder and execute
the following:
>>> python cocopTester.py
ROADMAP
- Version numbering is tentative.
Release# Goal
-------- ------------------------------------------------------
1.0.10b2. Coco now bootstraps correctly.
1.1.0rc. *** Release Candidate -- Coco now successfully runs the test suite
from the C# implementation.
1.1.1rc. Coco now correctly parses the examples and reports all the errors
in the example grammars.
1.1.2rc. Code generated from examples now sucessfully loads into python
using 'python name.py'
1.1.3rc Code generated from examples now successfully parses input
and generates errors when appropriate.
1.2.0. *** Final -- No bugs reported or found for some (as yet
undetermined) period of time (e.g. 3 months).
1.2.x. Various bug fix releases
1.3.0. Coco is now updated to equivalence of the latest Java & C#
implementations.
2.0.0. *** Enhancements -- Incorporated various enhancements
- get rid of all the static code
- Improve indentation of generated code (currently much is
hardcoded). Should be more flexible to user's preference.
As I move Coco towards a final release I also want to continuously update
and refine the documentation.