next up previous contents
Next: Definition of Voops-Target Up: D Examples of External Previous: Definition of Bison-Target

Definition of Flex-Target

The Flex-Target implemented by the vm::FlexFile subclassed from the built-in vm::LexFile used by the Lex-Target (see Lex-Target). The class definitions are shown in Listing D.3. Most of the methods are inherited, but new execution and termination methods are required to executing the parser and cleaning up after execution. In addition to the source file, the generated output depends on the lexical analyzer and its definition files. No instance variables are necessary for the vm::FlexFile, since this can be stored in the inherited part of the vm::LexFile. The executable itself of the lexical analyzer is generated partly by BISON using the Bison-Target.


 listing5388

As usual the generated output is marked read only. The implementation of the rule is shown in Listing D.4.


 listing5395

With this definitions the Flex-Target is made available with the syntax given in Flex-Target.
vmrule5403
This rule is almost identical to Lex-Target, but has the advantage, that it is independent of the underlying operating system and works even if no LEX is available. The key flex again defines the parser definition file and key prefix is now required in order to make the parser unique. All other keys remain optional with the same meaning, but without the restrictions of the Lex-Target (see Lex-Target).



IUE WWW server
Fri Jan 3 17:00:13 MET 1997