.TH GEN-SCANNER 1 "24 January 1991" "Demeter" "Demeter Software" .SH NAME gen-scanner \- scanner generator for Demeter System/C++ .SH SYNOPSIS .I gen-scanner .SH DESCRIPTION .I gen-scanner is usually implicitely called by .I make and generates the file lex.yy.c which is used by the Demeter generic parser. Lex.yy.c depends on the lex file lex-DEM.l which in turn consists of the following five files: .RS 5.0 - lex-definitions (lex specific definitions) .br - lex-syntax (cd-parse specific concrete syntax) .br - lex-comment (definition of comment sign) .br - lex-white-space (definition of white space) .br - lex-class-terminals (definition of syntax for terminal classes) .RE Any of the above files can be changed to customize the generic parser. If any of the files are changed, .I make will automatically regenerate lex-DEM.l and subsequently lex.yy.c. Lex-syntax depends on cd-parse which defines the concrete syntax for parsing object descriptions. Therefore, in order to define a different object description language customize cd-parse rather than lex-syntax directly. Once cd-parse is changed, lex-syntax is automatically regenerated from cd-parse. Note that you can protect your customized cd-parse from overriding by setting the .I Imakefile variable OVERWRITECDPARSE to "no". Even if OVERWRITECDPARSE is set to "yes", Demeter will not discard your cd-parse but simply move it into cd-parse.old. If .I gen-scanner is called explicitely, only lex-syntax is generated from cd-parse. .RS 5.0 .I Example: In order to change the comment sign in object descriptions from '//' (default) to '#', the file lex-comment has to be changed from: .RS 5.0 "//"*$ ; .RE .br to: .br .RS 5.0 "#"*$ ; .RE .RE Then simply, type .I make to make the changes effective, and don't forget to change your object descriptions. .SH SOURCE CODE The source is located at $DEMETER/bin. .SH SEE ALSO sem-check(1), generate(1), g_parse(2) .SH REFERENCES .I User's Guide for the Demeter System C++ .br Walter L. Hursch .br Northeastern University, 1993 .I The UNIX Programming Environment .br Brian W. Kernighan and Rob Pike .br Prentice Hall, 1984