C# and C++ version. Copy the following files to a new directory:
Coco.exe the executable
Scanner.frame the frame file from which the scanner is generated
Parser.frame the frame file from which the parser is generated
Java version. Copy the following files to a new directory:
Coco.jar an archive containing all classes of Coco/R
Scanner.frame the frame file from which the scanner is generated
Parser frame the frame file from which the parser is generated
3.2 Invocation
Coco/R can be invoked from the command line as follows:
C# or C++: Coco fileName [Options]
Java: java -jar Coco.jar fileName [Options]
fileName is the name of the file containing the Cocol/R compiler description. As a
convention, compiler descriptions have the extension .ATG (for attributed grammar).
Options. The following options may be specified:
Options =
{ "-namespace" namespaceName /* in Java: "-package" packageName */
| "-frames" framesDirectory
| "-trace" traceString
}.
The user can specify a namespace (or package) to which the generated scanner and
parser should belong (e.g. at.jku.ssw.Coco). If no namespace is specified the
generated classes belong to the default namespace. In the C++ version, the namespace
name must be a simple identifier (e.g. MyProject).
The -frames option can be used to specify the dire
coc/r学习笔记-调用与安装
最新推荐文章于 2025-08-07 13:45:16 发布