LINECNT.H
[目次 | 型・クラス・構造体 | マクロ]
1|/**************************************************************************
2|* 1. <<< BLex3 対応・行数カウンタ (LineCnt) >>>
3|***************************************************************************/
4|
5|#ifndef __LINECNT_H
6|#define __LINECNT_H
7|
8|
9|/*************************************************************************
10|* 2. <<< 優先ヘッダ >>>
11|**************************************************************************/
12|#ifndef USES_PRIORITY_HEADER
13|/*[START_OF_PRIORITY_HEADER]*/
14|
15|#define USES_LINECNT
16|typedef struct _LineCnt LineCnt;
17|
18|/*[END_OF_PRIORITY_HEADER]*/
19|#endif
20|
21|/* 派生属性の設定 */
22|#if defined(LINECNT_SOME)
23| #define LINECNT_OTHER
24|#endif
25|
26|/*************************************************************************
27|* 3. <<< エラーコード, リターンコード >>>
28|**************************************************************************/
29|
30|#define LineCnt_Err_Some 0
31|
32|
33|/*--------------------------------------------------------------*/
34|/*4. <<< Interface Area -------------------------------------- >>> */
35|/*--------------------------------------------------------------*/
36|
37|#ifdef __cplusplus
38|extern "C" {
39|#endif
40|
41|
42|/**************************************************************************
43|* 5. <<< [LineCnt] BLex3 対応・行数カウンタ >>>
44|***************************************************************************/
45|struct _LineCnt {
46| BLex3_Engine* eng;
47|
48| int iLine; /* 行番号(1〜)*/
49| int iColumn; /* 桁番号(1〜)*/
50| BLex3_Pos prevPos; /* 前回 parse したときのファイル・アドレス */
51|
52| ERRORS_INITCHK_VAR
53|};
54|
55|void LineCnt_init( LineCnt* );
56|void LineCnt_print( LineCnt*, const char* title );
57|
58|void LineCnt_linkEngine( LineCnt*, BLex3_Engine* eng );
59|void LineCnt_parse( LineCnt* );
60|int LineCnt_getTokenType( LineCnt* );
61|void LineCnt_getNextParsePos( LineCnt*, BLex3_Pos* );
62|
63|void LineCnt_printLastMsg( LineCnt*, FILE* f, const char* title );
64|
65|
66|#ifdef __cplusplus
67|}
68|#endif
69|
70|/*--------------------------------------------------------------*/
71|/*6. <<< Mapping Area ---------------------------------------- >>> */
72|/*--------------------------------------------------------------*/
73|
74|
75|#endif /* __LINECNT_H */
76|
77|