PageRenderTime 14ms CodeModel.GetById 1ms app.highlight 8ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Source/Swig/swigscan.h

#
C++ Header | 111 lines | 93 code | 5 blank | 13 comment | 0 complexity | ec26ac93a00612899e61742d20c394c6 MD5 | raw file
  1/* ----------------------------------------------------------------------------- 
  2 * This file is part of SWIG, which is licensed as a whole under version 3 
  3 * (or any later version) of the GNU General Public License. Some additional
  4 * terms also apply to certain portions of SWIG. The full details of the SWIG
  5 * license and copyrights can be found in the LICENSE and COPYRIGHT files
  6 * included with the SWIG source code as distributed by the SWIG developers
  7 * and at http://www.swig.org/legal.html.
  8 *
  9 * swigscan.h
 10 *
 11 * C/C++ scanner. 
 12 * ----------------------------------------------------------------------------- */
 13
 14typedef struct Scanner Scanner;
 15
 16extern Scanner     *NewScanner(void);
 17extern void         DelScanner(Scanner *);
 18extern void         Scanner_clear(Scanner *);
 19extern void         Scanner_push(Scanner *, String *);
 20extern void         Scanner_pushtoken(Scanner *, int, const_String_or_char_ptr value);
 21extern int          Scanner_token(Scanner *);
 22extern String      *Scanner_text(Scanner *);
 23extern void         Scanner_skip_line(Scanner *);
 24extern int          Scanner_skip_balanced(Scanner *, int startchar, int endchar);
 25extern void         Scanner_set_location(Scanner *, String *file, int line);
 26extern String      *Scanner_file(Scanner *);
 27extern int          Scanner_line(Scanner *);
 28extern int          Scanner_start_line(Scanner *);
 29extern void         Scanner_idstart(Scanner *, const char *idchar);
 30extern String      *Scanner_errmsg(Scanner *);
 31extern int          Scanner_errline(Scanner *);
 32extern int          Scanner_isoperator(int tokval);
 33extern void         Scanner_locator(Scanner *, String *loc);
 34
 35/* Note: Tokens in range 100+ are for C/C++ operators */
 36
 37#define   SWIG_MAXTOKENS          200
 38#define   SWIG_TOKEN_LPAREN       1        /* ( */
 39#define   SWIG_TOKEN_RPAREN       2        /* ) */
 40#define   SWIG_TOKEN_SEMI         3        /* ; */
 41#define   SWIG_TOKEN_LBRACE       4        /* { */
 42#define   SWIG_TOKEN_RBRACE       5        /* } */
 43#define   SWIG_TOKEN_LBRACKET     6        /* [ */
 44#define   SWIG_TOKEN_RBRACKET     7        /* ] */
 45#define   SWIG_TOKEN_BACKSLASH    8        /* \ */
 46#define   SWIG_TOKEN_ENDLINE      9        /* \n */
 47#define   SWIG_TOKEN_STRING       10       /* "str" */
 48#define   SWIG_TOKEN_POUND        11       /* # */
 49#define   SWIG_TOKEN_COLON        12       /* : */
 50#define   SWIG_TOKEN_DCOLON       13       /* :: */
 51#define   SWIG_TOKEN_DCOLONSTAR   14       /* ::* */
 52#define   SWIG_TOKEN_ID           15       /* identifer */
 53#define   SWIG_TOKEN_FLOAT        16       /* 3.1415F */
 54#define   SWIG_TOKEN_DOUBLE       17       /* 3.1415 */
 55#define   SWIG_TOKEN_INT          18       /* 314 */
 56#define   SWIG_TOKEN_UINT         19       /* 314U */
 57#define   SWIG_TOKEN_LONG         20       /* 314L */
 58#define   SWIG_TOKEN_ULONG        21       /* 314UL */
 59#define   SWIG_TOKEN_CHAR         22       /* 'charconst' */
 60#define   SWIG_TOKEN_PERIOD       23       /* . */
 61#define   SWIG_TOKEN_AT           24       /* @ */
 62#define   SWIG_TOKEN_DOLLAR       25       /* $ */
 63#define   SWIG_TOKEN_CODEBLOCK    26       /* %{ ... %} ... */
 64#define   SWIG_TOKEN_RSTRING      27       /* `charconst` */
 65#define   SWIG_TOKEN_LONGLONG     28       /* 314LL */
 66#define   SWIG_TOKEN_ULONGLONG    29       /* 314ULL */
 67#define   SWIG_TOKEN_QUESTION     30       /* ? */
 68#define   SWIG_TOKEN_COMMENT      31       /* C or C++ comment */
 69#define   SWIG_TOKEN_BOOL         32       /* true or false */
 70#define   SWIG_TOKEN_ILLEGAL      99
 71#define   SWIG_TOKEN_ERROR        -1
 72
 73#define   SWIG_TOKEN_COMMA        101      /* , */
 74#define   SWIG_TOKEN_STAR         102      /* * */
 75#define   SWIG_TOKEN_TIMES        102      /* * */
 76#define   SWIG_TOKEN_EQUAL        103      /* = */
 77#define   SWIG_TOKEN_EQUALTO      104      /* == */
 78#define   SWIG_TOKEN_NOTEQUAL     105      /* != */
 79#define   SWIG_TOKEN_PLUS         106      /* + */
 80#define   SWIG_TOKEN_MINUS        107      /* - */
 81#define   SWIG_TOKEN_AND          108      /* & */
 82#define   SWIG_TOKEN_LAND         109      /* && */
 83#define   SWIG_TOKEN_OR           110      /* | */
 84#define   SWIG_TOKEN_LOR          111      /* || */
 85#define   SWIG_TOKEN_XOR          112      /* ^ */
 86#define   SWIG_TOKEN_LESSTHAN     113      /* < */
 87#define   SWIG_TOKEN_GREATERTHAN  114      /* > */
 88#define   SWIG_TOKEN_LTEQUAL      115      /* <= */
 89#define   SWIG_TOKEN_GTEQUAL      116      /* >= */
 90#define   SWIG_TOKEN_NOT          117      /* ~ */
 91#define   SWIG_TOKEN_LNOT         118      /* ! */
 92#define   SWIG_TOKEN_SLASH        119      /* / */
 93#define   SWIG_TOKEN_DIVIDE       119      /* / */
 94#define   SWIG_TOKEN_PERCENT      120      /* % */
 95#define   SWIG_TOKEN_MODULO       120      /* % */
 96#define   SWIG_TOKEN_LSHIFT       121      /* << */
 97#define   SWIG_TOKEN_RSHIFT       122      /* >> */
 98#define   SWIG_TOKEN_PLUSPLUS     123      /* ++ */
 99#define   SWIG_TOKEN_MINUSMINUS   124      /* -- */
100#define   SWIG_TOKEN_PLUSEQUAL    125      /* += */
101#define   SWIG_TOKEN_MINUSEQUAL   126      /* -= */
102#define   SWIG_TOKEN_TIMESEQUAL   127      /* *= */
103#define   SWIG_TOKEN_DIVEQUAL     128      /* /= */
104#define   SWIG_TOKEN_ANDEQUAL     129      /* &= */
105#define   SWIG_TOKEN_OREQUAL      130      /* |= */
106#define   SWIG_TOKEN_XOREQUAL     131      /* ^= */
107#define   SWIG_TOKEN_LSEQUAL      132      /* <<= */
108#define   SWIG_TOKEN_RSEQUAL      133      /* >>= */
109#define   SWIG_TOKEN_MODEQUAL     134      /* %= */
110#define   SWIG_TOKEN_ARROW        135      /* -> */
111#define   SWIG_TOKEN_ARROWSTAR    136      /* ->* */