Changes between Version 15 and Version 16 of PIRCDevelopment

Show
Ignore:
Timestamp:
08/06/09 17:11:20 (5 years ago)
Author:
kjs
Comment:

more on heredoc

Legend:

Unmodified
Added
Removed
Modified
  • PIRCDevelopment

    v15 v16  
    141141}}} 
    142142 
    143 Note that the heredoc arguments may be mixed with other, simple arguments such as integers and numbers. In the rest of this section, the implementation will be discussed. 
     143Note that the heredoc arguments may be mixed with other, simple arguments such as integers and numbers. In the rest of this section, the implementation will be discussed.  
     144 
     145=== Heredoc parsing implementation === 
     146 
     147The implementation of the Heredoc preprocessor can be found in [source:/trunk/compilers/pirc/src/hdocprep.l]. It is a Lex/Flex lexer specification, which means you need the Flex program to generate the C code for this preprocessor. The preprocessor takes a PIR file that contains heredoc strings, and flattens out all heredoc strings. It writes a temporary file to disk that is exactly the same as the original PIR file, except that all heredoc strings are flattened. 
     148 
     149For this discussion, it is assumed you have a basic understanding of the Flex program. For instance, you need to know what "state" means in Flex context. If you don't know, please refer to [http://flex.sourceforge.net/manual/ the Flex documentation page]. 
    144150 
    145151== Macro layer ==