📄 scan_c.frm
字号:
//****************************************************************
// CPLUS2\SCAN_C.FRM
// Coco/R C++ Support Frames.
// Author: Frankie Arzu <farzu@uvg.edu.gt>
//
// Jun 12, 1996 Version 1.06
// Many fixes and suggestions thanks to
// Pat Terry <p.terry@.ru.ac.za>
// Oct 31, 1999 Version 1.14
// LeftContext Support
// Mar 24, 2000 Version 1.15
// LeftContext Support no longer needed
//****************************************************************
#include -->TokensHeader
#include -->ScanHeader
#define Scan_Ch Ch
#define Scan_NextCh NextCh
#define Scan_ComEols ComEols
#define Scan_CurrLine CurrLine
#define Scan_CurrCol CurrCol
#define Scan_LineStart LineStart
#define Scan_BuffPos BuffPos
#define Scan_NextLen NextSym.Len
int -->ScanClass::STATE0[] = {-->State0};
int -->ScanClass::CheckLiteral(int id)
{ char c;
c = CurrentCh(NextSym.Pos);
if (IgnoreCase) c = Upcase(c);
switch (c) {
-->Literals
}
return id;
}
int -->ScanClass::Comment()
{ int Level, StartLine, OldCol;
long OldLineStart;
Level = 1; StartLine = CurrLine;
OldLineStart = LineStart; OldCol = CurrCol;
-->Comment
return 0;
}
int -->ScanClass::Get()
{ int state, ctx;
start:
-->GetIgnore
-->GetComment
CurrSym = NextSym;
NextSym.Init(0, CurrLine, CurrCol - 1, BuffPos, 0);
NextSym.Len = 0; ctx = 0;
if (Ch == EOF_CHAR) return EOF_Sym;
state = STATE0[Ch];
while(1) {
Scan_NextCh(); NextSym.Len++;
switch (state) {
-->GetDFA
default: return No_Sym; /* Scan_NextCh already done */
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -