summaryrefslogtreecommitdiffabout
path: root/include/sitecing/sitecing_enflesher.h
Unidiff
Diffstat (limited to 'include/sitecing/sitecing_enflesher.h') (more/less context) (show whitespace changes)
-rw-r--r--include/sitecing/sitecing_enflesher.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/sitecing/sitecing_enflesher.h b/include/sitecing/sitecing_enflesher.h
index db15bc3..9eefdcc 100644
--- a/include/sitecing/sitecing_enflesher.h
+++ b/include/sitecing/sitecing_enflesher.h
@@ -4,42 +4,45 @@
4#include <fstream> 4#include <fstream>
5#include <string> 5#include <string>
6using namespace std; 6using namespace std;
7 7
8/** 8/**
9 * @file 9 * @file
10 * @brief The preprocessed source builder. 10 * @brief The preprocessed source builder.
11 */ 11 */
12 12
13#ifndef sitecing_enflesher_flexlexer_once 13#ifndef sitecing_enflesher_flexlexer_once
14#define sitecing_enflesher_flexlexer_once 14#define sitecing_enflesher_flexlexer_once
15#undef yyFlexLexer 15#undef yyFlexLexer
16/**
17 * nevermind me
18 */
16#define yyFlexLexer sitecing_enflesherFlexLexer 19#define yyFlexLexer sitecing_enflesherFlexLexer
17#include <FlexLexer.h> 20#include <FlexLexer.h>
18#undef yyFlexLexerOnce 21#undef yyFlexLexerOnce
19#endif 22#endif
20 23
21class sitecing_parser; 24class sitecing_parser;
22/** 25/**
23 * The enfleshing of the skeleton file according to the in-memory parsed 26 * The enfleshing of the skeleton file according to the in-memory parsed
24 * component source. 27 * component source.
25 */ 28 */
26class sitecing_enflesher : public sitecing_enflesherFlexLexer { 29class sitecing_enflesher : public sitecing_enflesherFlexLexer {
27 public: 30 public:
28 /** 31 /**
29 * It is time to anchor output with the #line directive. 32 * It is time to anchor output with the \#line directive.
30 */ 33 */
31 bool anchor_time; 34 bool anchor_time;
32 /** 35 /**
33 * The file currently being written is supposed to have #line 36 * The file currently being written is supposed to have \#line
34 * directives all around the place. 37 * directives all around the place.
35 */ 38 */
36 bool anchoraged; 39 bool anchoraged;
37 /** 40 /**
38 * The reference to the parser object containg the parsed source. 41 * The reference to the parser object containg the parsed source.
39 */ 42 */
40 sitecing_parser& parser; 43 sitecing_parser& parser;
41 /** 44 /**
42 * The output stream. 45 * The output stream.
43 */ 46 */
44 ofstream outs; 47 ofstream outs;
45 /** 48 /**
@@ -50,29 +53,38 @@ class sitecing_enflesher : public sitecing_enflesherFlexLexer {
50 53
51 /** 54 /**
52 * @param p The parser object containing preparsed data. 55 * @param p The parser object containing preparsed data.
53 */ 56 */
54 sitecing_enflesher(sitecing_parser& p) 57 sitecing_enflesher(sitecing_parser& p)
55 : parser(p), anchor_time(true) { } 58 : parser(p), anchor_time(true) { }
56 59
57 /** 60 /**
58 * Do the job. 61 * Do the job.
59 */ 62 */
60 void enflesh(); 63 void enflesh();
61 64
65 /**
66 * Output parsed data
67 * @param buf pointer to the data
68 * @param size length of the buffer pointed by buf
69 */
62 virtual void LexerOutput(const char *buf,int size); 70 virtual void LexerOutput(const char *buf,int size);
71 /**
72 * Lexer generated by flex
73 * @return zero on success
74 */
63 virtual int yylex(); 75 virtual int yylex();
64 76
65 /** 77 /**
66 * Put a #line anchor into output. 78 * Put a \#line anchor into output.
67 */ 79 */
68 void anchor(); 80 void anchor();
69 81
70 /** 82 /**
71 * Close previously opened output stream, rename to the 'correct' 83 * Close previously opened output stream, rename to the 'correct'
72 * destination filename, if needed, and open new file. 84 * destination filename, if needed, and open new file.
73 * @see outs 85 * @see outs
74 * @see outs_filename 86 * @see outs_filename
75 * @see outs_close 87 * @see outs_close
76 */ 88 */
77 void outs_open(const string& nfile); 89 void outs_open(const string& nfile);
78 /** 90 /**