?? sor.c
字號:
strcpy(zzastArg(1)->label, label.text);
(*_root)->file = file; (*_root)->line=line;
}
else {
if ( (LA(1)==NonTerm) ) {
file = CurFile; line=zzline;
zzmatch(NonTerm); zzsubroot(_root, &_sibling, &_tail);
strcpy(zzastArg(1)->label, label.text);
zzCONSUME;
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy = 1;
zzCONSUME;
}
else {
if ( (setwd4[LA(1)]&0x40) ) {
}
else {zzFAIL(1,zzerr21,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (setwd4[LA(1)]&0x80) ) {
{
zzBLOCK(zztasp4);
zzMake0;
{
if ( (LA(1)==85)
) {
zzmatch(85); zzCONSUME;
}
else {
if ( (LA(1)==PassAction) ) {
}
else {zzFAIL(1,zzerr22,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp4);
}
}
zzmatch(PassAction); zzsubchild(_root, &_sibling, &_tail);
(*_root)->in = 1;
zzCONSUME;
}
else {
if ( (setwd5[LA(1)]&0x1) ) {
}
else {zzFAIL(1,zzerr23,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==86) ) {
zzmatch(86); zzCONSUME;
zzmatch(PassAction); zzsubchild(_root, &_sibling, &_tail);
(*_root)->out = 1;
zzCONSUME;
}
else {
if ( (setwd5[LA(1)]&0x2) ) {
}
else {zzFAIL(1,zzerr24,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
(*_root)->file = file; (*_root)->line=line;
(*_root)->no_copy = no_copy || local_no_copy;
}
else {
if ( (LA(1)==WILD)
) {
file = CurFile; line=zzline;
zzmatch(WILD); zzsubchild(_root, &_sibling, &_tail);
strcpy(zzastArg(1)->label, label.text);
zzCONSUME;
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy = 1;
zzCONSUME;
}
else {
if ( (setwd5[LA(1)]&0x4) ) {
}
else {zzFAIL(1,zzerr25,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
(*_root)->no_copy = no_copy || local_no_copy;
(*_root)->file = file; (*_root)->line=line;
}
else {
if ( (setwd5[LA(1)]&0x8) ) {
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==88) ) {
zzmatch(88); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==87)
) {
zzmatch(87); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==PassAction) ) {
zzmatch(PassAction); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==Action) ) {
zzmatch(Action); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==Eof) ) {
zzmatch(Eof); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==89) ) {
zzmatch(89); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==OPT)
) {
zzmatch(OPT); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==90) ) {
zzmatch(90); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==80) ) {
zzmatch(80); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {
if ( (LA(1)==BT) ) {
zzmatch(BT); zzsubchild(_root, &_sibling, &_tail); zzCONSUME;
}
else {zzFAIL(1,zzerr26,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
}
}
}
}
}
}
}
}
zzEXIT(zztasp3);
}
}
err("cannot label this grammar construct");
found_error = 1;
}
else {zzFAIL(1,zzerr27,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
}
}
zzEXIT(zztasp2);
}
}
zzEXIT(zztasp1);
return;
fail:
zzEXIT(zztasp1);
found_error=1;
zzsyn(zzMissText, zzBadTok, (ANTLRChar *)"", zzMissSet, zzMissTok, zzErrk, zzBadText);
zzresynch(setwd5, 0x10);
}
}
void
#ifdef __USE_PROTOS
token(AST**_root,int no_copy)
#else
token(_root,no_copy)
AST **_root;
int no_copy ;
#endif
{
zzRULE;
zzBLOCK(zztasp1);
zzMake0;
{
SymEntry *p; int file, line; int local_no_copy=0;
file = CurFile; line=zzline;
zzmatch(Token); zzsubchild(_root, &_sibling, &_tail);
(*_root)->file = file; (*_root)->line=line;
zzCONSUME;
define_token(zzaArg(zztasp1,1 ).text);
{
zzBLOCK(zztasp2);
zzMake0;
{
if ( (LA(1)==91) ) {
zzmatch(91); zzCONSUME;
zzmatch(Token); zzCONSUME;
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==84)
) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd5[LA(1)]&0x20) ) {
}
else {zzFAIL(1,zzerr28,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
if ( !UserDefdTokens ) {
err("range operator is illegal without #tokdefs directive");
}
else {
p = define_token(zzaArg(zztasp2,2 ).text);
require(p!=NULL, "token: hash table is broken");
(*_root)->upper_range = p->token_type;
}
}
else {
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd5[LA(1)]&0x40) ) {
}
else {zzFAIL(1,zzerr29,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
}
zzEXIT(zztasp2);
}
}
(*_root)->no_copy = no_copy||local_no_copy;
zzEXIT(zztasp1);
return;
fail:
zzEXIT(zztasp1);
zzsyn(zzMissText, zzBadTok, (ANTLRChar *)"", zzMissSet, zzMissTok, zzErrk, zzBadText);
zzresynch(setwd5, 0x80);
}
}
void
#ifdef __USE_PROTOS
tree(AST**_root,int no_copy)
#else
tree(_root,no_copy)
AST **_root;
int no_copy ;
#endif
{
zzRULE;
zzBLOCK(zztasp1);
zzMake0;
{
Attrib label; SymEntry *p, *s; int local_no_copy=0; AST *t=NULL;
zzmatch(BT); zzCONSUME;
{
zzBLOCK(zztasp2);
zzMake0;
{
if ( (LA(1)==Token) && (setwd6[LA(2)]&0x1) ) {
zzmatch(Token); zzsubroot(_root, &_sibling, &_tail);
t=zzastArg(1);
zzCONSUME;
define_token(zzaArg(zztasp2,1 ).text);
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==91)
) {
zzmatch(91); zzCONSUME;
zzmatch(Token); zzCONSUME;
{
zzBLOCK(zztasp4);
zzMake0;
{
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd6[LA(1)]&0x2) ) {
}
else {zzFAIL(1,zzerr30,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp4);
}
}
if ( !UserDefdTokens ) {
err("range operator is illegal without #tokdefs directive");
}
else {
p = define_token(zzaArg(zztasp3,2 ).text);
require(p!=NULL, "element: hash table is broken");
t->upper_range = p->token_type;
}
}
else {
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd6[LA(1)]&0x4) ) {
}
else {zzFAIL(1,zzerr31,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
}
zzEXIT(zztasp3);
}
}
t->no_copy = no_copy||local_no_copy; t->is_root = 1;
}
else {
if ( (LA(1)==WILD)
) {
zzmatch(WILD); zzsubroot(_root, &_sibling, &_tail); zzCONSUME;
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy = 1;
zzCONSUME;
}
else {
if ( (setwd6[LA(1)]&0x8) ) {
}
else {zzFAIL(1,zzerr32,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
zzastArg(1)->no_copy = no_copy || local_no_copy; zzastArg(1)->is_root = 1;
}
else {
if ( (setwd6[LA(1)]&0x10) && (LA(2)==LABEL) ) {
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==Token) ) {
zzmatch(Token);
label = zzaArg(zztasp3,1);
zzCONSUME;
}
else {
if ( (LA(1)==NonTerm)
) {
zzmatch(NonTerm);
label = zzaArg(zztasp3,1);
zzCONSUME;
}
else {zzFAIL(1,zzerr33,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp3);
}
}
s = (SymEntry *) hash_get(symbols, label.text);
if ( s==NULL ) {
s = (SymEntry *) hash_add(symbols, label.text, (Entry *) newSymEntry(label.text));
s->token = LABEL;
}
else if ( s->token!=LABEL ) {
err(eMsg2("label definition clashes with %s definition: '%s'", zztokens[s->token], label.text));
}
zzmatch(LABEL); zzCONSUME;
{
zzBLOCK(zztasp3);
zzMake0;
{
if ( (LA(1)==Token) ) {
zzmatch(Token); zzsubroot(_root, &_sibling, &_tail);
strcpy(zzastArg(1)->label, label.text); t = zzastArg(1);
zzCONSUME;
define_token(zzaArg(zztasp3,1 ).text);
{
zzBLOCK(zztasp4);
zzMake0;
{
if ( (LA(1)==91) ) {
zzmatch(91); zzCONSUME;
zzmatch(Token); zzCONSUME;
{
zzBLOCK(zztasp5);
zzMake0;
{
if ( (LA(1)==84) ) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd6[LA(1)]&0x20) ) {
}
else {zzFAIL(1,zzerr34,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
zzEXIT(zztasp5);
}
}
if ( !UserDefdTokens ) {
err("range operator is illegal without #tokdefs directive");
}
else {
p = define_token(zzaArg(zztasp4,2 ).text);
require(p!=NULL, "element: hash table is broken");
t->upper_range = p->token_type;
}
}
else {
if ( (LA(1)==84)
) {
zzmatch(84);
local_no_copy=1;
zzCONSUME;
}
else {
if ( (setwd6[LA(1)]&0x40) ) {
}
else {zzFAIL(1,zzerr35,&zzMissSet,&zzMissText,&zzBadTok,&zzBadText,&zzErrk); goto fail;}
}
}
zzEXIT(zztasp4);
}
}
t->no_copy = no_copy||local_no_copy;
}
else {
if ( (LA(1)==WILD) ) {
zzmatch(WILD); zzsubroot(_root, &_sibling, &_tail);
strcpy(zzastArg(1)->label, label.text);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -