~ubuntu-branches/ubuntu/saucy/ladr/saucy

« back to all changes in this revision

Viewing changes to ladr/parse.c

  • Committer: Package Import Robot
  • Author(s): Frank Lichtenheld
  • Date: 2013-05-25 11:43:32 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20130525114332-lkzco1dti2hwrf7v
Tags: 0.0.200911a-2
* QA upload.
* Upload to unstable.
* Change maintainer to QA group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
static BOOL Parenthesize = FALSE;
30
30
static BOOL Check_for_illegal_symbols = TRUE;
 
31
static BOOL Simple_parse = FALSE;
31
32
 
32
33
/* Token types */
33
34
 
685
686
    }
686
687
    else if (special_char(c)) {
687
688
      tok->type = TOK_SPECIAL;
688
 
#if 0
689
 
      /* old way: token is maximal sequence of special chars */
690
 
      tok->sb = get_string_buf();
691
 
      while (special_char(c)) {
692
 
        sb_append_char(tok->sb, c);
693
 
        c = sb_char(sb, ++i);
694
 
      }
695
 
#else
696
 
      /* new way: token is maximal sequence that is a known special symbol */
697
 
      tok->sb = max_special_symbol(sb, &i);
698
 
      c = sb_char(sb, i);
699
 
#endif
 
689
      if (Simple_parse) {
 
690
        /* token is maximal sequence of special chars */
 
691
        tok->sb = get_string_buf();
 
692
        while (special_char(c)) {
 
693
          sb_append_char(tok->sb, c);
 
694
          c = sb_char(sb, ++i);
 
695
        }
 
696
      }
 
697
      else {
 
698
        /* token is maximal sequence that is a known special symbol */
 
699
        tok->sb = max_special_symbol(sb, &i);
 
700
        c = sb_char(sb, i);
 
701
      }
700
702
    }
701
703
    else if (quote_char(c)) {
702
704
      char qc = c;
1979
1981
  Check_for_illegal_symbols = setting;
1980
1982
}  /* check_for_illegal_symbols */
1981
1983
 
 
1984
/*************
 
1985
 *
 
1986
 *   simple_parse()
 
1987
 *
 
1988
 *************/
 
1989
 
 
1990
/* DOCUMENTATION
 
1991
   Do not try to parse "op command" symbols.
 
1992
*/
 
1993
 
 
1994
/* PUBLIC */
 
1995
void simple_parse(BOOL setting)
 
1996
{
 
1997
  Simple_parse = setting;
 
1998
}  /* simple_parse */