/[global]/global/htags/lexcommon.h
ViewVC logotype

Diff of /global/htags/lexcommon.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by shigio, Wed Mar 30 02:02:00 2005 UTC revision 1.13 by shigio, Sat Apr 23 14:56:37 2005 UTC
# Line 49  to generate language specific symbols. Line 49  to generate language specific symbols.
49   * and PREPROCESSOR_LINE as %start values, even if they are not used.   * and PREPROCESSOR_LINE as %start values, even if they are not used.
50   * It assumed that CPP_COMMENT and SHELL_COMMENT is one line comment.   * It assumed that CPP_COMMENT and SHELL_COMMENT is one line comment.
51   */   */
52  static int lineno;  static int lexcommon_lineno;
53  static int begin_line;  static int begin_line;
54  /*  /*
55   * If you want newline to terminate string, set this variable to 1.   * If you want newline to terminate string, set this variable to 1.
56   */   */
57  static int newline_terminate_string = 0;  static int newline_terminate_string = 0;
58    
59  #define LINENO  lineno  #define LINENO lexcommon_lineno
60    
61  #define DEFAULT_BEGIN_OF_FILE_ACTION {                                  \  #define DEFAULT_BEGIN_OF_FILE_ACTION {                                  \
62          LEXIN = ip;                                                     \          LEXIN = ip;                                                     \
63          LEXRESTART(LEXIN);                                              \          LEXRESTART(LEXIN);                                              \
64          lineno = 1;                                                     \          LINENO = 1;                                                     \
65          begin_line = 1;                                                 \          begin_line = 1;                                                 \
66  }  }
67    
68  #define DEFAULT_YY_USER_ACTION {                                        \  #define DEFAULT_YY_USER_ACTION {                                        \
69          if (begin_line) {                                               \          if (begin_line) {                                               \
70                  put_begin_of_line(lineno);                              \                  put_begin_of_line(LINENO);                              \
71                  switch (YY_START) {                                     \                  switch (YY_START) {                                     \
72                  case C_COMMENT:                                         \                  case C_COMMENT:                                         \
73                  case CPP_COMMENT:                                       \                  case CPP_COMMENT:                                       \
# Line 96  static int newline_terminate_string = 0; Line 96  static int newline_terminate_string = 0;
96          }                                                               \          }                                                               \
97          if (YY_START == PREPROCESSOR_LINE)                              \          if (YY_START == PREPROCESSOR_LINE)                              \
98                  yy_pop_state();                                         \                  yy_pop_state();                                         \
99          put_end_of_line(lineno);                                        \          put_end_of_line(LINENO);                                        \
100          /* for the next line */                                         \          /* for the next line */                                         \
101          lineno++;                                                       \          LINENO++;                                                       \
102          begin_line = 1;                                                 \          begin_line = 1;                                                 \
103  }  }
104    
# Line 111  static int newline_terminate_string = 0; Line 111  static int newline_terminate_string = 0;
111                  echos(comment_end);                                     \                  echos(comment_end);                                     \
112                  break;                                                  \                  break;                                                  \
113          }                                                               \          }                                                               \
114          put_end_of_line(lineno);                                        \          put_end_of_line(LINENO);                                        \
115          /* for the next line */                                         \          /* for the next line */                                         \
116          lineno++;                                                       \          LINENO++;                                                       \
117          begin_line = 1;                                                 \          begin_line = 1;                                                 \
118  }  }
119    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26