Lines Matching refs:lem
1341 struct lemon lem; local
1352 lem.errorcnt = 0;
1358 lem.argv0 = argv[0];
1359 lem.filename = OptArg(0);
1360 lem.basisflag = basisflag;
1361 lem.has_fallback = 0;
1362 lem.nconflict = 0;
1363 lem.name = lem.include = lem.arg = lem.tokentype = lem.start = 0;
1364 lem.vartype = 0;
1365 lem.stacksize = 0;
1366 lem.error = lem.overflow = lem.failure = lem.accept = lem.tokendest =
1367 lem.tokenprefix = lem.outname = lem.extracode = 0;
1368 lem.vardest = 0;
1369 lem.tablesize = 0;
1371 lem.errsym = Symbol_new("error");
1374 Parse(&lem);
1375 if( lem.errorcnt ) exit(lem.errorcnt);
1376 if( lem.rule==0 ){
1382 lem.nsymbol = Symbol_count();
1384 lem.symbols = Symbol_arrayof();
1385 for(i=0; i<=lem.nsymbol; i++) lem.symbols[i]->index = i;
1386 qsort(lem.symbols,lem.nsymbol+1,sizeof(struct symbol*),
1388 for(i=0; i<=lem.nsymbol; i++) lem.symbols[i]->index = i;
1389 for(i=1; isupper(lem.symbols[i]->name[0]); i++);
1390 lem.nterminal = i;
1394 Reprint(&lem);
1397 SetSize(lem.nterminal);
1400 FindRulePrecedences(&lem);
1404 FindFirstSets(&lem);
1408 lem.nstate = 0;
1409 FindStates(&lem);
1410 lem.sorted = State_arrayof();
1413 FindLinks(&lem);
1416 FindFollowSets(&lem);
1419 FindActions(&lem);
1422 if( compress==0 ) CompressTables(&lem);
1425 if( !quiet ) ReportOutput(&lem);
1428 ReportTable(&lem, mhflag);
1433 if( !mhflag ) ReportHeader(&lem);
1437 lem.nterminal, lem.nsymbol - lem.nterminal, lem.nrule);
1439 lem.nstate, lem.tablesize, lem.nconflict);
1441 if( lem.nconflict ){
1442 fprintf(stderr,"%d parsing conflicts.\n",lem.nconflict);
1444 exit(lem.errorcnt + lem.nconflict);
1445 return (lem.errorcnt + lem.nconflict);