📄 scanner.c
字号:
/*Copyright (c) 2000, Red Hat, Inc.This file is part of Source-Navigator.Source-Navigator is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public License as publishedby the Free Software Foundation; either version 2, or (at your option)any later version.Source-Navigator is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public License alongwith Source-Navigator; see the file COPYING. If not, write tothe Free Software Foundation, 59 Temple Place - Suite 330, Boston,MA 02111-1307, USA.*/#define rbool char#define rtrue 1#define rfalse 0#define StdIn 0#include "Scanner.h"#ifdef __cplusplusextern "C" {#include "Source.h"#include "rSystem.h"#include "General.h"#include "DynArray.h"#include "Position.h"}#else#include "Source.h"#include "rSystem.h"#include "General.h"#include "DynArray.h"#include "Position.h"#endif#include <stdio.h>#if defined __STDC__ | defined __cplusplus#include <stdlib.h>#endif#define yyStart(State) { yyPreviousStart = yyStartState; yyStartState = State;}#define yyPrevious { yyStateRange s = yyStartState; \ yyStartState = yyPreviousStart; yyPreviousStart = s; }#define yyEcho { (void) fwrite (TokenPtr, 1, \ TokenLength, stdout); }#define yyEol(Column) { yyLineCount ++; \ yyLineStart = (unsigned char *) TokenPtr + \ TokenLength - 1 - (Column); }#define output(c) (void) putchar ((int) c)#define yyColumn(Ptr) ((int) ((Ptr) - (char *) yyLineStart))#define yyOffset(Ptr) (yyFileOffset + ((Ptr) - yyChBufferStart2))#define yyDNoState 0#define yyFirstCh (unsigned char) '\0'#define yyLastCh (unsigned char) '\377'#define yyEolCh (unsigned char) '\12'#define yyEobCh (unsigned char) '\177'#define yyDStateCount 515#define yyTableSize 23727#define yyEobState 433#define yyDefaultState 434#define STD 1#define Comment_Entry 3#define Note 5#define Picture 7#define String1 9#define String2 11#define SQL 13#define Pseudo_Text 15#define Continue_Picture 17#define Continue_Int 19#define Continue_Real 21#define Continue_Para 23#define Continue_Name 25#define Include 27#define Skip 29#define Directive 31#define xxyyPush#define xxyyPopstatic void yyExit ARGS ((void)){ rExit (1); }typedef unsigned short yyStateRange;typedef struct { yyStateRange yyCheck, yyNext; } yyCombType; char * TokenPtr ; int TokenLength ; tScanAttribute Attribute ; void (* Scanner_Exit) ARGS ((void)) = yyExit;static void yyErrorMessage ARGS ((int yyErrorCode));#ifdef xxinputstatic char input ARGS ((void));#endifstatic void unput ARGS ((char));static void yyLess ARGS ((int));static yyCombType yyComb [yyTableSize + 1] = {{ 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 128}, { 1, 435}, { 1, 124}, { 1, 92}, { 1, 92}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 92}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 439}, { 1, 91}, { 1, 490}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 482}, { 1, 498}, { 1, 481}, { 1, 480}, { 1, 123}, { 1, 122}, { 1, 87}, { 1, 121}, { 1, 120}, { 1, 476}, { 1, 90}, { 1, 90}, { 1, 90}, { 1, 90}, { 1, 90}, { 1, 90}, { 1, 474}, { 1, 471}, { 1, 469}, { 1, 90}, { 1, 468}, { 1, 206}, { 1, 465}, { 1, 33}, { 1, 463}, { 1, 91}, { 1, 91}, { 1, 428}, { 1, 428}, { 1, 394}, { 1, 428}, { 1, 392}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 411}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 412}, { 1, 428}, { 1, 233}, { 1, 428}, { 1, 395}, { 1, 414}, { 1, 386}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 228}, { 1, 428}, { 1, 428}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 428}, { 1, 428}, { 1, 394}, { 1, 428}, { 1, 392}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 411}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 412}, { 1, 428}, { 1, 233}, { 1, 428}, { 1, 395}, { 1, 414}, { 1, 386}, { 1, 428}, { 1, 428}, { 1, 428}, { 1, 228}, { 1, 428}, { 1, 428}, { 1, 91}, { 1, 91}, { 1, 91}, { 1, 91}, { 16, 507}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 1, 124}, { 2, 440}, { 4, 323}, { 43, 58}, { 58, 58}, { 2, 39}, { 4, 39}, { 67, 459}, { 73, 433}, { 6, 443}, { 123, 478}, { 2, 252}, { 4, 86}, { 6, 157}, { 2, 500}, { 4, 501}, { 2, 477}, { 4, 86}, { 124, 433}, { 6, 203}, { 89, 391}, { 8, 440}, { 6, 502}, { 154, 110}, { 6, 203}, { 8, 163}, { 155, 165}, { 58, 58}, { 14, 449}, { 18, 452}, { 125, 260}, { 8, 406}, { 14, 160}, { 18, 162}, { 8, 503}, { 123, 140}, { 8, 406}, { 2, 88}, { 14, 186}, { 18, 404}, { 156, 154}, { 14, 506}, { 18, 508}, { 14, 186}, { 18, 404}, { 20, 452}, { 22, 452}, { 158, 319}, { 159, 317}, { 20, 39}, { 22, 39}, { 162, 347}, { 89, 391}, { 24, 452}, { 164, 82}, { 20, 173}, { 22, 173}, { 24, 39}, { 20, 509}, { 22, 510}, { 20, 173}, { 22, 173}, { 125, 260}, { 24, 170}, { 168, 165}, { 169, 433}, { 24, 511}, { 123, 140}, { 24, 170}, { 2, 88}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 437}, { 3, 435}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 441}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205}, { 3, 205},
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -