[BACK]Return to parse.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Diff for /OpenXM/src/ox_toolkit/parse.c between version 1.12 and 1.13

version 1.12, 2003/03/23 22:09:57 version 1.13, 2003/03/30 08:05:23
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM: OpenXM/src/ox_toolkit/parse.c,v 1.11 2003/03/23 20:17:35 ohara Exp $ */  /* $OpenXM: OpenXM/src/ox_toolkit/parse.c,v 1.12 2003/03/23 22:09:57 ohara Exp $ */
   
 /*  /*
    This module is a parser for OX/CMO expressions.     This module is a parser for OX/CMO expressions.
Line 52  static void parse_error(char *s);
Line 52  static void parse_error(char *s);
 static void parse_right_parenthesis();  static void parse_right_parenthesis();
 static void parse_left_parenthesis();  static void parse_left_parenthesis();
 static void parse_comma();  static void parse_comma();
 #if defined(WITH_GMP)  
 static mpz_ptr parse_mpz_integer();  static mpz_ptr parse_mpz_integer();
 #endif /* WITH_GMP */  
 static int   parse_integer();  static int   parse_integer();
 static char *parse_string();  static char *parse_string();
 static cmo  *parse_cmo_null();  static cmo  *parse_cmo_null();
Line 63  static cmo  *parse_cmo_string();
Line 61  static cmo  *parse_cmo_string();
 static cmo  *parse_cmo_mathcap();  static cmo  *parse_cmo_mathcap();
 static cmo  *parse_cmo_list();  static cmo  *parse_cmo_list();
 static cmo  *parse_cmo_monomial32();  static cmo  *parse_cmo_monomial32();
 #if defined(WITH_GMP)  
 static cmo  *parse_cmo_zz();  static cmo  *parse_cmo_zz();
 #endif /* WITH_GMP */  
 static cmo  *parse_cmo_zero();  static cmo  *parse_cmo_zero();
 static cmo  *parse_cmo_dms_generic();  static cmo  *parse_cmo_dms_generic();
 static cmo  *parse_cmo_ring_by_name();  static cmo  *parse_cmo_ring_by_name();
Line 222  static cmo *parse_cmo()
Line 218  static cmo *parse_cmo()
         token = lex();          token = lex();
         m = parse_cmo_monomial32();          m = parse_cmo_monomial32();
         break;          break;
 #if defined(WITH_GMP)  
     case TOKEN(CMO_ZZ):      case TOKEN(CMO_ZZ):
         token = lex();          token = lex();
         m = parse_cmo_zz();          m = parse_cmo_zz();
         break;          break;
 #endif /* WITH_GMP */  
     case TOKEN(CMO_ZERO):      case TOKEN(CMO_ZERO):
         token = lex();          token = lex();
         m = parse_cmo_zero();          m = parse_cmo_zero();
Line 282  static void parse_comma()
Line 276  static void parse_comma()
     token = lex();      token = lex();
 }  }
   
 #if defined(WITH_GMP)  
 static mpz_ptr new_mpz_set_str(char *s)  static mpz_ptr new_mpz_set_str(char *s)
 {  {
     mpz_ptr z = malloc(sizeof(mpz_t));      mpz_ptr z = malloc(sizeof(mpz_t));
Line 326  static mpz_ptr parse_mpz_integer()
Line 319  static mpz_ptr parse_mpz_integer()
     token = lex();      token = lex();
     return val;      return val;
 }  }
 #endif /* WITH_GMP */  
   
 static int parse_integer()  static int parse_integer()
 {  {
 #if defined(WITH_GMP)  #if 0
     return mpz_get_si(parse_mpz_integer());      return mpz_get_si(parse_mpz_integer());
 #else  #else
     int sign = 1;      int sign = 1;
Line 474  static cmo *parse_cmo_monomial32()
Line 466  static cmo *parse_cmo_monomial32()
     return (cmo *)m;      return (cmo *)m;
 }  }
   
 #if defined(WITH_GMP)  
 /* the following function rewrite internal data of mpz/cmo_zz. */  /* the following function rewrite internal data of mpz/cmo_zz. */
 static cmo *parse_cmo_zz()  static cmo *parse_cmo_zz()
 {  {
Line 503  static cmo *parse_cmo_zz()
Line 494  static cmo *parse_cmo_zz()
     parse_right_parenthesis();      parse_right_parenthesis();
     return (cmo *)m;      return (cmo *)m;
 }  }
 #endif /* WITH_GMP */  
   
 static cmo *parse_cmo_zero()  static cmo *parse_cmo_zero()
 {  {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>