Exemplo n.º 1
0
ATerm STRSGLR_set_asfix2me_format(void)
{
  STRSGLR_ensure_init();
  SG_ASFIX2_OFF();
  SG_ASFIX2ME_ON();
  return (ATerm) ATempty;
}
Exemplo n.º 2
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;
  }
}