[go: up one dir, main page]

File: pre_analyzer.h

package info (click to toggle)
findent 3.1.7-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,176 kB
  • sloc: sh: 4,746; cpp: 4,049; fortran: 1,565; pascal: 1,204; lex: 533; yacc: 305; makefile: 179; python: 155; lisp: 52
file content (17 lines) | stat: -rw-r--r-- 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef PRE_ANALYZER_H
#define PRE_ANALYZER_H

#include <stack>

class Pre_analyzer
{
   std::stack<bool> ifelse_stack; // to note if there is an #else after #if

   public:

   int analyze(const std::string s, const int pretype);

   enum {PRE_NONE=1, PRE_IF, PRE_ELIF, PRE_ELSE, PRE_ENDIF, PRE_ENDIFE};
};

#endif