Ejemplo n.º 1
0
ATbool set_global_options(void)
{
  if(debugflag)                    SG_DEBUG_ON();
  if(verboseflag)                  SG_VERBOSE_ON();
  if(filterflag)                   SG_FILTER_ON();
  if(filter_associativityflag)     SG_FILTER_ASSOCIATIVITY_ON();
  if(filter_directeagernessflag)   SG_FILTER_DIRECTEAGERNESS_ON();
  if(filter_eagernessflag)         SG_FILTER_EAGERNESS_ON();
  if(filter_injectioncountflag)    SG_FILTER_INJECTIONCOUNT_ON();
  if(filter_priorityflag)          SG_FILTER_PRIORITY_ON();
  if(filter_rejectflag)            SG_FILTER_REJECT_ON();
  if(cycleflag)                    SG_CYCLE_ON();
  if(start_symbol)                 SG_STARTSYMBOL_ON();
  if(statisticsflag)               SG_SHOWSTAT_ON();
  if(outputflag)                   SG_OUTPUT_ON();
  if(asfix2meflag)                 SG_ASFIX2ME_ON();
  if(binaryflag)                   SG_BINARY_ON();
  if(ambiguityerrorflag)           SG_AMBIGUITY_ERROR_ON();

  if(!parse_table_name) {
    SG_DEBUG_OFF();
    SG_SHOWSTAT_OFF();
  }

  if(SG_STATISTICS) {
    SG_OpenLog(program_name, SG_DEBUG?".sglr-log":"sglr-stats.txt");
  }

  /*  Return whether a possibly runnable instantiation has been obtained...  */
  if(parse_table_name) {
    return ATtrue;
  }
  else {
    return ATfalse;
  }
}
Ejemplo n.º 2
0
ATerm STRSGLR_set_log_statistics_off(void)
{
  STRSGLR_ensure_init();
  SG_SHOWSTAT_OFF();
  return (ATerm) ATempty;
}