You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(121) |
Aug
(343) |
Sep
(98) |
Oct
(55) |
Nov
(158) |
Dec
(219) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(278) |
Feb
(170) |
Mar
(286) |
Apr
(32) |
May
(83) |
Jun
(140) |
Jul
(212) |
Aug
(242) |
Sep
(52) |
Oct
(29) |
Nov
(132) |
Dec
(259) |
| 2010 |
Jan
(251) |
Feb
(147) |
Mar
(76) |
Apr
(140) |
May
(43) |
Jun
(66) |
Jul
(273) |
Aug
(205) |
Sep
(260) |
Oct
(100) |
Nov
(58) |
Dec
(264) |
| 2011 |
Jan
(219) |
Feb
(344) |
Mar
(320) |
Apr
(334) |
May
(125) |
Jun
(131) |
Jul
(195) |
Aug
(155) |
Sep
(55) |
Oct
(261) |
Nov
(286) |
Dec
(216) |
| 2012 |
Jan
(188) |
Feb
(177) |
Mar
(39) |
Apr
(179) |
May
(148) |
Jun
(43) |
Jul
(229) |
Aug
(104) |
Sep
(76) |
Oct
(82) |
Nov
(93) |
Dec
(180) |
| 2013 |
Jan
(323) |
Feb
(335) |
Mar
(35) |
Apr
(220) |
May
(238) |
Jun
(122) |
Jul
(316) |
Aug
(73) |
Sep
(135) |
Oct
(515) |
Nov
(320) |
Dec
(185) |
| 2014 |
Jan
(81) |
Feb
(146) |
Mar
(337) |
Apr
(234) |
May
(112) |
Jun
(239) |
Jul
(323) |
Aug
(123) |
Sep
(83) |
Oct
(285) |
Nov
(321) |
Dec
(96) |
| 2015 |
Jan
(77) |
Feb
(79) |
Mar
(124) |
Apr
(71) |
May
(35) |
Jun
(45) |
Jul
(77) |
Aug
(44) |
Sep
(22) |
Oct
(84) |
Nov
(120) |
Dec
(37) |
| 2016 |
Jan
(38) |
Feb
(74) |
Mar
(242) |
Apr
(153) |
May
(59) |
Jun
(44) |
Jul
(67) |
Aug
(74) |
Sep
(150) |
Oct
(35) |
Nov
(69) |
Dec
(43) |
| 2017 |
Jan
(43) |
Feb
(9) |
Mar
(274) |
Apr
(40) |
May
(81) |
Jun
(81) |
Jul
(87) |
Aug
(46) |
Sep
(98) |
Oct
(50) |
Nov
(220) |
Dec
(66) |
| 2018 |
Jan
(110) |
Feb
(22) |
Mar
(20) |
Apr
(147) |
May
(148) |
Jun
(30) |
Jul
(83) |
Aug
(63) |
Sep
(40) |
Oct
(53) |
Nov
(51) |
Dec
(104) |
| 2019 |
Jan
(14) |
Feb
(81) |
Mar
(80) |
Apr
(102) |
May
(16) |
Jun
(5) |
Jul
(34) |
Aug
(24) |
Sep
(9) |
Oct
(12) |
Nov
(42) |
Dec
(76) |
| 2020 |
Jan
(15) |
Feb
(11) |
Mar
(12) |
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
|
2
(2) |
3
|
4
(3) |
5
(4) |
6
|
7
|
|
8
|
9
|
10
(1) |
11
(2) |
12
(2) |
13
(5) |
14
|
|
15
(1) |
16
(7) |
17
(13) |
18
(12) |
19
(1) |
20
(18) |
21
(3) |
|
22
(10) |
23
(12) |
24
(10) |
25
(30) |
26
(6) |
27
(15) |
28
(4) |
|
29
(14) |
30
(4) |
|
|
|
|
|
|
From: <luc...@us...> - 2012-04-30 20:44:01
|
Revision: 15741
http://sbml.svn.sourceforge.net/sbml/?rev=15741&view=rev
Author: luciansmith
Date: 2012-04-30 20:43:50 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Final version of the L3Parser with everything hidden! Most things that used to be in the .h file are now inline in the .ypp file, and the ypp file should now be used to create L3Parser.cpp instead of L3parser.tab.cpp as it did before by default.
Also:
- It is now impossible to reset the default L3Parser settings. Instead, you must use one of the 'With*' functions instead to change the behavior of the parser.
- The static functions are gone, and the C functions just run that code directly.
- The passed-in L3ParserSettings object is now constant, and contains a const Model* object.
- The L3Parser class now consistently uses 'defaultL3ParserSettings' instead of 'defaultParserSettings'.
- getLastParseL3Error now creates the global l3p object if one did not exist.
- Tests and examples updated to use new versions of functions
- SBMLTypes.h now also #includes L3ParserSettings.
Modified Paths:
--------------
trunk/libsbml/examples/c++/translateL3Math.cpp
trunk/libsbml/src/sbml/SBMLTypes.h
trunk/libsbml/src/sbml/math/L3Parser.h
trunk/libsbml/src/sbml/math/L3Parser.ypp
trunk/libsbml/src/sbml/math/L3ParserSettings.cpp
trunk/libsbml/src/sbml/math/L3ParserSettings.h
trunk/libsbml/src/sbml/math/Makefile.in
trunk/libsbml/src/sbml/math/test/TestL3FormulaParser.cpp
trunk/libsbml/src/sbml/math/test/TestL3FormulaParserC.c
Added Paths:
-----------
trunk/libsbml/src/sbml/math/L3Parser.cpp
Removed Paths:
-------------
trunk/libsbml/src/sbml/math/L3Parser.tab.cpp
Modified: trunk/libsbml/examples/c++/translateL3Math.cpp
===================================================================
--- trunk/libsbml/examples/c++/translateL3Math.cpp 2012-04-30 15:22:22 UTC (rev 15740)
+++ trunk/libsbml/examples/c++/translateL3Math.cpp 2012-04-30 20:43:50 UTC (rev 15741)
@@ -148,10 +148,10 @@
translateInfix (const char* formula, const L3ParserSettings& settings)
{
char* result;
- ASTNode* math = L3Parser::parseL3Formula(formula, settings);
+ ASTNode* math = SBML_parseL3FormulaWithSettings(formula, &settings);
if (math==NULL) {
- result = L3Parser::getLastParseL3Error();
+ result = SBML_getLastParseL3Error();
}
else {
result = writeMathMLToString(math);
Modified: trunk/libsbml/src/sbml/SBMLTypes.h
===================================================================
--- trunk/libsbml/src/sbml/SBMLTypes.h 2012-04-30 15:22:22 UTC (rev 15740)
+++ trunk/libsbml/src/sbml/SBMLTypes.h 2012-04-30 20:43:50 UTC (rev 15741)
@@ -83,6 +83,7 @@
#include <sbml/math/FormulaFormatter.h>
#include <sbml/math/MathML.h>
#include <sbml/math/L3Parser.h>
+#include <sbml/math/L3ParserSettings.h>
#include <sbml/annotation/ModelHistory.h>
#include <sbml/annotation/ModelCreator.h>
Copied: trunk/libsbml/src/sbml/math/L3Parser.cpp (from rev 15740, trunk/libsbml/src/sbml/math/L3Parser.tab.cpp)
===================================================================
--- trunk/libsbml/src/sbml/math/L3Parser.cpp (rev 0)
+++ trunk/libsbml/src/sbml/math/L3Parser.cpp 2012-04-30 20:43:50 UTC (rev 15741)
@@ -0,0 +1,2788 @@
+/* A Bison parser, made by GNU Bison 2.4.2. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.4.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
+#define yyparse sbml_yyparse
+#define yylex sbml_yylex
+#define yyerror sbml_yyerror
+#define yylval sbml_yylval
+#define yychar sbml_yychar
+#define yydebug sbml_yydebug
+#define yynerrs sbml_yynerrs
+
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 52 "L3Parser.ypp"
+
+/**
+ * This file is AUTOMATICALLY GENERATED by the 'bison' program and
+ * should not be modified directly. It is created with the command
+ *
+ * bison -v L3Parser.ypp -o L3Parser.cpp
+ *
+ * from the L3Parser.ypp file. Any modifications should be performed on
+ * that file directly.
+ *
+ * This file defines an entire class, 'L3Parser', that does not appear
+ * in any header file, as it is only useful in the context of the C functions
+ * generated by the bison program. Future versions of this parser may
+ * use a version of bison that generates a parser object instead of C
+ * functions, but for now, the only interface with the library is defined
+ * in the L3Parser.h file.
+ */
+#include <sbml/math/L3Parser.h>
+#include <sbml/Model.h>
+#include <sbml/math/L3ParserSettings.h>
+
+#include <sstream>
+
+LIBSBML_CPP_NAMESPACE_BEGIN
+
+class SBMLVisitor;
+class FormulaUnitsData;
+
+#ifndef SWIG //Hide the entire class from SWIG
+/**
+ * @class L3Parser
+ * @brief Class providing functionality for the bison-generated parser.
+ *
+ * The L3Parser class is an internal class designed to hold the guts of the bison parser, plus
+ * the lexer. It is designed to be a global singleton object, because that's the cleanest way
+ * I could find to incorporate functions into the bison framework.
+ *
+ * The functions declared in this file are defined in the file L3Parser.ypp, which
+ * must be compiled by bison to create L3Parser.tab.cpp, the file included in
+ * libsbml. For more details, see the L3Parser.ypp file.
+ *
+ * Within the various 'sbml_yylex*' functions that bison creates, functions
+ * from the global 'l3p' object (of the L3Parser class) are used to calculate
+ * necessary information for the parsing of the string, and to determine appropriate
+ * error messages when things go wrong.
+ * @internal
+ */
+class LIBSBML_EXTERN L3Parser
+{
+public:
+
+ std::stringstream input;
+ ASTNode* outputNode;
+ std::string error;
+ std::map<std::string, std::string*> words;
+ long exponent;
+ long denominator;
+
+ //settings:
+ L3ParserSettings defaultL3ParserSettings;
+ const Model* model;
+ l3p_log_type parselog;
+ bool collapseminus;
+ bool parseunits;
+ bool avocsymbol;
+
+ L3Parser();
+ ~L3Parser();
+
+ //Functions needed for the parser and the lexer:
+ /**
+ * Compares 'name' against a list of known constants, and returns the particular
+ * constant type (AST_CONSTANT_TRUE, AST_CONSTANT_PI, AST_NAME_TIME) associated
+ * with that string (with case ignored). For the mathematical constants
+ * infinity and notanumber, AST_REAL is returned, and the parser must then
+ * examine the string again to discover what to do with the ASTNode.
+ */
+ ASTNodeType_t getSymbolFor(std::string name) const;
+ /**
+ * Compares 'name' against a list of known functions allowed in the MathML
+ * of SBML Level 2 and 3. Multiple mappings of string->type are present,
+ * so that (for example) both the strings 'acos' and 'arccos' return the
+ * type AST_FUNCTION_ARCCOS. "log" returns AST_FUNCTION_LOG, so when
+ * user preference is taken into consideration, 'name' must once again
+ * be checked.
+ */
+ ASTNodeType_t getFunctionFor(std::string name) const;
+ /**
+ * This function creates an ASTNode that is a 'piecewise' function that
+ * mimics the 'modulo' function 'x % y'. It was modified from the
+ * function of the same name in Copasi in its CEvaluationNodeOperator
+ * class, which itself had modifications submitted by Frank Bergmann.
+ */
+ ASTNode* createModuloTree(ASTNode* x, ASTNode* y) const;
+ /**
+ * Sets the member variable 'collapseminus' to the provided boolean value. Used in parsing
+ * unary minuses.
+ */
+ void setCollapseMinus(bool collapse);
+ /**
+ * Sets the member variable 'parselog' to the provided enum. Used in parsing
+ * strings with the function "log" with a single argument.
+ */
+ void setParseLog(l3p_log_type parseas);
+ /**
+ * Sets the member variable 'parseunits' to the provided boolean. Used in
+ * deciding whether strings that assign units to numbers (like "10 mL")
+ * are parsed correctly, or as errors.
+ */
+ void setParseUnits(bool units);
+ /**
+ * Sets the member variable 'avocsymbol' to the provided boolean. Used in
+ * deciding whether to parse the string 'avogadro' as an ASTNode of type
+ * AST_NAME_AVOGADRO or AST_NAME with the name 'avogadro'.
+ */
+ void setAvoCsymbol(bool avo);
+ /**
+ * Compares the two strings, and returns 'true' if they are equivalent,
+ * ignoring case. Used in the parser and in the 'getSymbolFor' and
+ * 'getFunctionFor' functions.
+ */
+ bool caselessStrCmp(const std::string& lhs, const std::string& rhs) const;
+ /**
+ * Sets the input string to be parsed, copied to the 'input' stringstream
+ * member variable.
+ */
+ void setInput(const char* c);
+ /**
+ * Sets the error string so that it can be retrieved by the function
+ * 'SBML_getLastParseL3Error'.
+ */
+ void setError(const char* c);
+ /**
+ * Sets the error string so that it can be retrieved by the function
+ * 'SBML_getLastParseL3Error'.
+ */
+ void setError(std::string c);
+ /**
+ * Resets the L3Parser object, removing any error or input strings,
+ * setting the output ASTNode to NULL, and resetting all parser settings
+ * to that stored in the 'defaultL3ParserSettings' member variable.
+ */
+ void clear();
+ /**
+ * Returns the 'error' member variable, which is either empty or contains
+ * the error message set from a 'setError' function.
+ */
+ std::string getError();
+
+ /**
+ * The bison parser needs string pointers to pass around from function to
+ * function. In order to not create too many of these objects, and to
+ * ensure that they are properly deleted, the lexer calls this function
+ * when it encounters a valid ID string to get a stable pointer that can
+ * be passed to the parser functions.
+ *
+ * In this function, 'word' is looked up in a hash map of strings to
+ * string pointers; if it is not found, a new string pointer containing
+ * the string is created, added to the hash, and returned. If it is
+ * found, the previously-created pointer is returned.
+ */
+ std::string* addWord(const std::string& word);
+
+ /**
+ * This function checks the provided ASTNode function to see if it is a
+ * known function with the wrong number of arguments. If so, an error is set
+ * (using the 'setError' function) and 'true' is returned. If the
+ * correct number of arguments is provided, 'false' is returned.
+ */
+ bool checkNumArguments(const ASTNode* function);
+
+ /**
+ * Provides a copy of the default parser settings member variable.
+ */
+ L3ParserSettings getDefaultL3ParserSettings();
+
+ /*
+ * Change the default settings for this parser to the settings provided. All subsequent
+ * calls to parseL3Formula with no 'settings' argument will use these settings
+ * instead of the defaults.
+ */
+ void setDefaultSettings(L3ParserSettings settings);
+
+ /**
+ * If the either versions of the function @see SBML_parseL3Formula() returns NULL, an error
+ * is set internally which is accessible via this function. The returned error will
+ * report the string it was trying to parse, which character it had parsed when it
+ * encountered the error, and what the error was.
+ *
+ */
+ static char* getLastParseL3Error();
+};
+/** @endcond */ //The entire class should be invisible to the documentation.
+#endif //The entire class should be invisible to SWIG, too.
+
+ using namespace std;
+
+ int sbml_yylex(void);
+ L3Parser* l3p = NULL;
+ void sbml_yyerror(char const *);
+ int sbml_yylloc_first_position = 1;
+ int sbml_yylloc_last_position = 1;
+
+
+/* Line 189 of yacc.c */
+#line 285 "L3Parser.cpp"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 1
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 1
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ YYEOF = 0,
+ NOT = 258,
+ NEG = 259,
+ DOUBLE = 260,
+ INTEGER = 261,
+ E_NOTATION = 262,
+ RATIONAL = 263,
+ SYMBOL = 264
+ };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c */
+#line 257 "L3Parser.ypp"
+
+ ASTNode* astnode;
+ char character;
+ const string* word;
+ double numdouble;
+ long numlong;
+ double mantissa;
+ long rational;
+
+
+
+/* Line 214 of yacc.c */
+#line 343 "L3Parser.cpp"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 355 "L3Parser.cpp"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 17
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 170
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 25
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 5
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 35
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 63
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 264
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 8, 2, 2, 2, 14, 3, 2,
+ 22, 23, 12, 11, 24, 10, 2, 13, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 5, 7, 6, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 15, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 9, 16,
+ 17, 18, 19, 20, 21
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint8 yyprhs[] =
+{
+ 0, 0, 3, 4, 6, 8, 11, 13, 15, 19,
+ 23, 27, 31, 35, 39, 43, 47, 51, 54, 59,
+ 64, 69, 74, 79, 84, 89, 94, 97, 101, 106,
+ 108, 110, 112, 114, 117, 119
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 26, 0, -1, -1, 27, -1, 1, -1, 27, 1,
+ -1, 28, -1, 21, -1, 22, 27, 23, -1, 27,
+ 15, 27, -1, 27, 12, 27, -1, 27, 11, 27,
+ -1, 27, 13, 27, -1, 27, 10, 27, -1, 27,
+ 14, 27, -1, 27, 6, 27, -1, 27, 5, 27,
+ -1, 10, 27, -1, 27, 6, 7, 27, -1, 27,
+ 5, 7, 27, -1, 27, 7, 7, 27, -1, 27,
+ 8, 7, 27, -1, 27, 5, 6, 27, -1, 27,
+ 6, 5, 27, -1, 27, 3, 3, 27, -1, 27,
+ 4, 4, 27, -1, 8, 27, -1, 21, 22, 23,
+ -1, 21, 22, 29, 23, -1, 17, -1, 19, -1,
+ 18, -1, 20, -1, 28, 21, -1, 27, -1, 29,
+ 24, 27, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 290, 290, 291, 292, 293, 296, 297, 323, 324,
+ 325, 336, 347, 348, 349, 350, 351, 352, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 405, 456,
+ 457, 458, 459, 460, 474, 475
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "\"end of string\"", "error", "$undefined", "'&'", "'|'", "'<'", "'>'",
+ "'='", "'!'", "NOT", "'-'", "'+'", "'*'", "'/'", "'%'", "'^'", "NEG",
+ "\"number\"", "\"integer\"", "\"number in e-notation form\"",
+ "\"number in rational notation\"", "\"element name\"", "'('", "')'",
+ "','", "$accept", "input", "node", "number", "nodelist", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 38, 124, 60, 62, 61, 33, 258,
+ 45, 43, 42, 47, 37, 94, 259, 260, 261, 262,
+ 263, 264, 40, 41, 44
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 25, 26, 26, 26, 26, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 28,
+ 28, 28, 28, 28, 29, 29
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 1, 1, 2, 1, 1, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 2, 4, 4,
+ 4, 4, 4, 4, 4, 4, 2, 3, 4, 1,
+ 1, 1, 1, 2, 1, 3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 4, 0, 0, 29, 31, 30, 32, 7, 0,
+ 0, 0, 6, 26, 17, 0, 0, 1, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 33, 27, 34, 0, 8, 0, 0, 0, 0,
+ 16, 0, 0, 15, 0, 0, 13, 11, 10, 12,
+ 14, 9, 28, 0, 24, 25, 22, 19, 23, 18,
+ 20, 21, 35
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 10, 11, 12, 34
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -17
+static const yytype_int16 yypact[] =
+{
+ 44, -17, 38, 38, -17, -17, -17, -17, -16, 38,
+ 10, 115, -9, 93, -17, 123, 64, -17, -17, 8,
+ 11, 92, 75, 7, 9, 38, 38, 38, 38, 38,
+ 38, -17, -17, 144, -15, -17, 38, 38, 38, 38,
+ 93, 38, 38, 93, 38, 38, -10, -10, 2, 2,
+ 2, 2, -17, 38, 155, 155, 93, 93, 93, 93,
+ 93, 93, 144
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -17, -17, -2, -17, -17
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -4
+static const yytype_int8 yytable[] =
+{
+ 13, 14, 27, 28, 29, 30, 15, 16, 52, 53,
+ 17, 36, 31, 33, 44, 37, 45, 30, 0, 40,
+ 43, 0, 0, 46, 47, 48, 49, 50, 51, 0,
+ 0, 0, 0, 0, 54, 55, 56, 57, 0, 58,
+ 59, 0, 60, 61, -2, 1, 2, 0, 3, 0,
+ 0, 62, 2, 0, 3, 4, 5, 6, 7, 8,
+ 9, 4, 5, 6, 7, 8, 9, 19, 20, 21,
+ 22, 23, 24, 0, 25, 26, 27, 28, 29, 30,
+ 41, 0, 42, 2, 0, 3, 0, 35, 0, 0,
+ 0, 0, 4, 5, 6, 7, 8, 9, 38, 39,
+ 2, 0, 3, 25, 26, 27, 28, 29, 30, 4,
+ 5, 6, 7, 8, 9, -3, 18, 0, 19, 20,
+ 21, 22, 23, 24, 0, 25, 26, 27, 28, 29,
+ 30, 2, 0, 3, 0, 0, 0, 0, 0, 0,
+ 4, 5, 6, 7, 8, 9, 32, 19, 20, 21,
+ 22, 23, 24, 0, 25, 26, 27, 28, 29, 30,
+ 21, 22, 23, 24, 0, 25, 26, 27, 28, 29,
+ 30
+};
+
+static const yytype_int8 yycheck[] =
+{
+ 2, 3, 12, 13, 14, 15, 22, 9, 23, 24,
+ 0, 3, 21, 15, 7, 4, 7, 15, -1, 21,
+ 22, -1, -1, 25, 26, 27, 28, 29, 30, -1,
+ -1, -1, -1, -1, 36, 37, 38, 39, -1, 41,
+ 42, -1, 44, 45, 0, 1, 8, -1, 10, -1,
+ -1, 53, 8, -1, 10, 17, 18, 19, 20, 21,
+ 22, 17, 18, 19, 20, 21, 22, 3, 4, 5,
+ 6, 7, 8, -1, 10, 11, 12, 13, 14, 15,
+ 5, -1, 7, 8, -1, 10, -1, 23, -1, -1,
+ -1, -1, 17, 18, 19, 20, 21, 22, 6, 7,
+ 8, -1, 10, 10, 11, 12, 13, 14, 15, 17,
+ 18, 19, 20, 21, 22, 0, 1, -1, 3, 4,
+ 5, 6, 7, 8, -1, 10, 11, 12, 13, 14,
+ 15, 8, -1, 10, -1, -1, -1, -1, -1, -1,
+ 17, 18, 19, 20, 21, 22, 23, 3, 4, 5,
+ 6, 7, 8, -1, 10, 11, 12, 13, 14, 15,
+ 5, 6, 7, 8, -1, 10, 11, 12, 13, 14,
+ 15
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 1, 8, 10, 17, 18, 19, 20, 21, 22,
+ 26, 27, 28, 27, 27, 22, 27, 0, 1, 3,
+ 4, 5, 6, 7, 8, 10, 11, 12, 13, 14,
+ 15, 21, 23, 27, 29, 23, 3, 4, 6, 7,
+ 27, 5, 7, 27, 7, 7, 27, 27, 27, 27,
+ 27, 27, 23, 24, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
+
+#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+
+/* Line 1464 of yacc.c */
+#line 291 "L3Parser.ypp"
+ {l3p->outputNode = (yyvsp[(1) - (1)].astnode);}
+ break;
+
+ case 4:
+
+/* Line 1464 of yacc.c */
+#line 292 "L3Parser.ypp"
+ {;}
+ break;
+
+ case 5:
+
+/* Line 1464 of yacc.c */
+#line 293 "L3Parser.ypp"
+ {delete (yyvsp[(1) - (2)].astnode);;}
+ break;
+
+ case 6:
+
+/* Line 1464 of yacc.c */
+#line 296 "L3Parser.ypp"
+ {(yyval.astnode) = (yyvsp[(1) - (1)].astnode);;}
+ break;
+
+ case 7:
+
+/* Line 1464 of yacc.c */
+#line 297 "L3Parser.ypp"
+ {
+ (yyval.astnode) = new ASTNode();
+ string name(*(yyvsp[(1) - (1)].word));
+ (yyval.astnode)->setName(name.c_str());
+ if (l3p->model == NULL ||
+ (l3p->model->getSpecies(name) == NULL
+ && l3p->model->getCompartment(name) == NULL
+ && l3p->model->getReaction(name) == NULL
+ && l3p->model->getParameter(name) == NULL
+ && l3p->model->getSpeciesReference(name) == NULL)) {
+ //The symbol is not used in any other mathematical context in the SBML model, so we can see if it matches a list of pre-defined names
+ ASTNodeType_t type = l3p->getSymbolFor(name);
+ if (type != AST_UNKNOWN) (yyval.astnode)->setType(type);
+ if (type==AST_REAL) {
+ if (l3p->caselessStrCmp(name, "inf")) (yyval.astnode)->setValue(numeric_limits<double>::infinity());
+ if (l3p->caselessStrCmp(name, "infinity")) (yyval.astnode)->setValue(numeric_limits<double>::infinity());
+ if (l3p->caselessStrCmp(name, "nan")) (yyval.astnode)->setValue(numeric_limits<double>::quiet_NaN());
+ if (l3p->caselessStrCmp(name, "notanumber")) (yyval.astnode)->setValue(numeric_limits<double>::quiet_NaN());
+ }
+ if (!l3p->avocsymbol && type==AST_NAME_AVOGADRO) {
+ //Don't parse 'avogadro' as a csymbol.
+ (yyval.astnode)->setName(name.c_str());
+ (yyval.astnode)->setType(AST_NAME);
+ }
+ }
+ ;}
+ break;
+
+ case 8:
+
+/* Line 1464 of yacc.c */
+#line 323 "L3Parser.ypp"
+ {(yyval.astnode) = (yyvsp[(2) - (3)].astnode);;}
+ break;
+
+ case 9:
+
+/* Line 1464 of yacc.c */
+#line 324 "L3Parser.ypp"
+ {(yyval.astnode) = new ASTNode(AST_POWER); (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode)); (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 10:
+
+/* Line 1464 of yacc.c */
+#line 325 "L3Parser.ypp"
+ {
+ if ((yyvsp[(1) - (3)].astnode)->getType()==AST_TIMES) {
+ (yyval.astnode) = (yyvsp[(1) - (3)].astnode);
+ (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));
+ }
+ else {
+ (yyval.astnode) = new ASTNode(AST_TIMES);
+ (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode));
+ (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));
+ }
+ ;}
+ break;
+
+ case 11:
+
+/* Line 1464 of yacc.c */
+#line 336 "L3Parser.ypp"
+ {
+ if ((yyvsp[(1) - (3)].astnode)->getType()==AST_PLUS) {
+ (yyval.astnode) = (yyvsp[(1) - (3)].astnode);
+ (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));
+ }
+ else {
+ (yyval.astnode) = new ASTNode(AST_PLUS);
+ (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode));
+ (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));
+ }
+ ;}
+ break;
+
+ case 12:
+
+/* Line 1464 of yacc.c */
+#line 347 "L3Parser.ypp"
+ {(yyval.astnode) = new ASTNode(AST_DIVIDE); (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode)); (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 13:
+
+/* Line 1464 of yacc.c */
+#line 348 "L3Parser.ypp"
+ {(yyval.astnode) = new ASTNode(AST_MINUS); (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode)); (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 14:
+
+/* Line 1464 of yacc.c */
+#line 349 "L3Parser.ypp"
+ {(yyval.astnode) = l3p->createModuloTree((yyvsp[(1) - (3)].astnode), (yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 15:
+
+/* Line 1464 of yacc.c */
+#line 350 "L3Parser.ypp"
+ {(yyval.astnode) = new ASTNode(AST_RELATIONAL_GT); (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode)); (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 16:
+
+/* Line 1464 of yacc.c */
+#line 351 "L3Parser.ypp"
+ {(yyval.astnode) = new ASTNode(AST_RELATIONAL_LT); (yyval.astnode)->addChild((yyvsp[(1) - (3)].astnode)); (yyval.astnode)->addChild((yyvsp[(3) - (3)].astnode));;}
+ break;
+
+ case 17:
+
+/* Line 1464 of yacc.c */
+#line 352 "L3Parser.ypp"
+ {
+ if (l3p->collapseminus) {
+ if ((yyvsp[(2) - (2)].astnode)->getType()==AST_REAL) {
+ (yyval.astnode) = (yyvsp[(2) - (2)].astnode);
+ (yyval.astnode)->setValue(-(yyval.astnode)->getReal());
+ }
+ else if ((yyvsp[(2) - (2)].astnode)->getType()==AST_INTEGER) {
+ (yyval.astnode) = (yyvsp[(2) - (2)].astnode);
+ (yyval.astnode)->setValue(-(yyval.astnode)->getInteger());
+ }
+ else if ((yyvsp[(2) - (2)].astnode)->getType()==AST_REAL_E) {
+ (yyval.astnode) = (yyvsp[(2) - (2)].astnode);
+ (yyval.astnode)->setValue(-(yyval.astnode)->getMantissa(), (yyval.astnode)->getExponent());
+ }
+ else if ((yyvsp[(2) - (2)].astnode)->getType()==AST_RATIONAL) {
+ (yyval.astnode) = (yyvsp[(2) - (2)].astnode);
+ (yyval....
[truncated message content] |
|
From: <sar...@us...> - 2012-04-30 15:22:31
|
Revision: 15740
http://sbml.svn.sourceforge.net/sbml/?rev=15740&view=rev
Author: sarahkeating
Date: 2012-04-30 15:22:22 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
add functions to remove or replace individual toplevel elements within an annotations
since we have stopped the appendAnnotation function from appending if it finds a top level element with the same ns you can now remove the existing toplevel element and then append or even use replace which does the same thing
Modified Paths:
--------------
trunk/libsbml/src/sbml/SBase.cpp
trunk/libsbml/src/sbml/SBase.h
trunk/libsbml/src/sbml/annotation/test/TestRDFAnnotation.cpp
trunk/libsbml/src/sbml/common/operationReturnValues.h
Modified: trunk/libsbml/src/sbml/SBase.cpp
===================================================================
--- trunk/libsbml/src/sbml/SBase.cpp 2012-04-30 08:29:15 UTC (rev 15739)
+++ trunk/libsbml/src/sbml/SBase.cpp 2012-04-30 15:22:22 UTC (rev 15740)
@@ -1357,7 +1357,115 @@
}
+int
+SBase::removeTopLevelAnnotationElement(const std::string elementName,
+ const std::string elementURI)
+{
+
+ int success = LIBSBML_OPERATION_FAILED;
+ if (mAnnotation == NULL)
+ {
+ success = LIBSBML_OPERATION_SUCCESS;
+ return success;
+ }
+
+ int index = mAnnotation->getIndex(elementName);
+ if (index < 0)
+ {
+ // the annotation does not have a child of this name
+ success = LIBSBML_ANNOTATION_NAME_NOT_FOUND;
+ return success;
+ }
+ else
+ {
+ // check uri matches
+ std::string prefix = mAnnotation->getChild(index).getPrefix();
+ if (elementURI.empty() == false
+ && elementURI != mAnnotation->getChild(index).getNamespaceURI(prefix))
+ {
+ success = LIBSBML_ANNOTATION_NS_NOT_FOUND;
+ return success;
+ }
+
+ // remove the annotation at the index corresponding to the name
+ mAnnotation->removeChild(index);
+ if (mAnnotation->getNumChildren() == 0)
+ {
+ delete mAnnotation;
+ mAnnotation = NULL;
+ }
+
+ // check success
+ if (mAnnotation == NULL || mAnnotation->getIndex(elementName) < 0)
+ {
+ success = LIBSBML_OPERATION_SUCCESS;
+ }
+ }
+
+ return success;
+}
+
+
+int
+SBase::replaceTopLevelAnnotationElement(const XMLNode* annotation)
+{
+ int success = LIBSBML_OPERATION_FAILED;
+ XMLNode * replacement = NULL;
+ if (annotation->getName() == "annotation")
+ {
+ if (annotation->getNumChildren() != 1)
+ {
+ success = LIBSBML_INVALID_OBJECT;
+ return success;
+ }
+ else
+ {
+ replacement = annotation->getChild(0).clone();
+ }
+ }
+ else
+ {
+ replacement = annotation->clone();
+ }
+
+ success = removeTopLevelAnnotationElement(replacement->getName());
+ if (success == LIBSBML_OPERATION_SUCCESS)
+ {
+ success = appendAnnotation(annotation);
+ }
+
+ delete (replacement);
+
+ return success;
+}
+
+
+int
+SBase::replaceTopLevelAnnotationElement(const std::string& annotation)
+{
+ int success = LIBSBML_OPERATION_FAILED;
+ XMLNode* annt_xmln;
+ if (getSBMLDocument() != NULL)
+ {
+ XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+ annt_xmln = XMLNode::convertStringToXMLNode(annotation,xmlns);
+ }
+ else
+ {
+ annt_xmln = XMLNode::convertStringToXMLNode(annotation);
+ }
+
+ if(annt_xmln != NULL)
+ {
+ success = replaceTopLevelAnnotationElement(annt_xmln);
+ delete annt_xmln;
+ }
+
+ return success;
+}
+
+
/*
* Sets the notes of this SBML object to a copy of notes.
*/
@@ -6668,6 +6776,71 @@
}
+LIBSBML_EXTERN
+int
+SBase_removeTopLevelAnnotationElement (SBase_t *sb, char *name)
+{
+ if (sb != NULL)
+ {
+ if (name != NULL)
+ return sb->removeTopLevelAnnotationElement(name);
+ else
+ return LIBSBML_INVALID_OBJECT;
+ }
+ else
+ return LIBSBML_INVALID_OBJECT;
+}
+
+
+LIBSBML_EXTERN
+int
+SBase_removeTopLevelAnnotationElementWithURI (SBase_t *sb, const char *name,
+ const char *uri)
+{
+ if (sb != NULL)
+ {
+ if (name != NULL && uri != NULL)
+ return sb->removeTopLevelAnnotationElement(name, uri);
+ else
+ return LIBSBML_INVALID_OBJECT;
+ }
+ else
+ return LIBSBML_INVALID_OBJECT;
+}
+
+
+LIBSBML_EXTERN
+int
+SBase_replaceTopLevelAnnotationElement (SBase_t *sb, XMLNode_t *annotation)
+{
+ if (sb != NULL)
+ {
+ if (annotation != NULL)
+ return sb->replaceTopLevelAnnotationElement(annotation);
+ else
+ return LIBSBML_INVALID_OBJECT;
+ }
+ else
+ return LIBSBML_INVALID_OBJECT;
+}
+
+
+LIBSBML_EXTERN
+int
+SBase_replaceTopLevelAnnotationElementString (SBase_t *sb, char *annotation)
+{
+ if (sb != NULL)
+ {
+ if (annotation != NULL)
+ return sb->replaceTopLevelAnnotationElement(annotation);
+ else
+ return LIBSBML_INVALID_OBJECT;
+ }
+ else
+ return LIBSBML_INVALID_OBJECT;
+}
+
+
/**
* Unsets the "metaid" attribute of the given object.
*
Modified: trunk/libsbml/src/sbml/SBase.h
===================================================================
--- trunk/libsbml/src/sbml/SBase.h 2012-04-30 08:29:15 UTC (rev 15739)
+++ trunk/libsbml/src/sbml/SBase.h 2012-04-30 15:22:22 UTC (rev 15740)
@@ -1523,6 +1523,97 @@
/**
+ * Removes the top-level element within the "annotation"
+ * subelement of this SBML object with the given name and optional URI.
+ *
+ * SBML places a few restrictions on the organization of the content of
+ * annotations; these are intended to help software tools read and write
+ * the data as well as help reduce conflicts between annotations added by
+ * different tools. Please see the SBML specifications for more details.
+ *
+ * Calling this method allows a particular annotation element to be removed
+ * whilst the remaining annotations remain intact.
+ *
+ * @param elementName a string representing the name of the top level
+ * annotation element that is to be removed
+ * @param elementURI an optional string that is used to check both the name
+ * and URI of the top level element to be removed
+ *
+ * @return integer value indicating success/failure of the
+ * function. The possible values returned by this function are:
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND @endlink
+ *
+ * @see replaceTopLevelAnnotationElement(const XMLNode *)
+ * @see replaceTopLevelAnnotationElement(const std::string&)
+ */
+ int removeTopLevelAnnotationElement(const std::string elementName,
+ const std::string elementURI = "");
+
+
+ /**
+ * Replaces the given top-level element within the "annotation"
+ * subelement of this SBML object and with the annotation element supplied.
+ *
+ * SBML places a few restrictions on the organization of the content of
+ * annotations; these are intended to help software tools read and write
+ * the data as well as help reduce conflicts between annotations added by
+ * different tools. Please see the SBML specifications for more details.
+ *
+ * This method determines the name of the element to be replaced from the
+ * annotation argument. Functionally it is equivalent to calling
+ * <code> removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name);
+ * </code> with the exception that the placement of the annotation element remains
+ * the same.
+ *
+ * @param annotation XMLNode representing the replacement top level annotation
+ *
+ * @return integer value indicating success/failure of the
+ * function. The possible values returned by this function are:
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
+ *
+ * @see removeTopLevelAnnotationElement(const std::string elementName,
+ const std::string elementURI = "")
+ * @see replaceTopLevelAnnotationElement(const std::string&)
+ */
+ int replaceTopLevelAnnotationElement(const XMLNode* annotation);
+
+
+ /**
+ * Replaces the given top-level element within the "annotation"
+ * subelement of this SBML object and with the annotation element supplied.
+ *
+ * SBML places a few restrictions on the organization of the content of
+ * annotations; these are intended to help software tools read and write
+ * the data as well as help reduce conflicts between annotations added by
+ * different tools. Please see the SBML specifications for more details.
+ *
+ * This method determines the name of the element to be replaced from the
+ * annotation argument. Functionally it is equivalent to calling
+ * <code> removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name);
+ * </code> with the exception that the placement of the annotation element remains
+ * the same.
+ *
+ * @param annotation string representing the replacement top level annotation
+ *
+ * @return integer value indicating success/failure of the
+ * function. The possible values returned by this function are:
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED @endlink
+ * @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT @endlink
+ *
+ * @see removeTopLevelAnnotationElement(const std::string elementName,
+ const std::string elementURI = "")
+ * @see replaceTopLevelAnnotationElement(const XMLNode*)
+ */
+ int replaceTopLevelAnnotationElement(const std::string& annotation);
+
+
+ /**
* Sets the value of the "notes" subelement of this SBML object.
*
* The content of @p notes is copied, and any existing content of this
@@ -3518,6 +3609,32 @@
LIBSBML_EXTERN
int
+SBase_appendAnnotationString (SBase_t *sb, char *annotation);
+
+
+LIBSBML_EXTERN
+int
+SBase_removeTopLevelAnnotationElement (SBase_t *sb, char *name);
+
+
+LIBSBML_EXTERN
+int
+SBase_removeTopLevelAnnotationElementWithURI (SBase_t *sb, const char *name,
+ const char *uri);
+
+
+LIBSBML_EXTERN
+int
+SBase_replaceTopLevelAnnotationElement (SBase_t *sb, XMLNode_t *annotation);
+
+
+LIBSBML_EXTERN
+int
+SBase_replaceTopLevelAnnotationElementString (SBase_t *sb, char *annotation);
+
+
+LIBSBML_EXTERN
+int
SBase_unsetMetaId (SBase_t *sb);
Modified: trunk/libsbml/src/sbml/annotation/test/TestRDFAnnotation.cpp
===================================================================
--- trunk/libsbml/src/sbml/annotation/test/TestRDFAnnotation.cpp 2012-04-30 08:29:15 UTC (rev 15739)
+++ trunk/libsbml/src/sbml/annotation/test/TestRDFAnnotation.cpp 2012-04-30 15:22:22 UTC (rev 15740)
@@ -1651,6 +1651,7 @@
}
END_TEST
+
START_TEST (test_RDFAnnotation_testCreateAnnotations)
{
XMLNode *ann = RDFAnnotationParser::createAnnotation();
@@ -1731,6 +1732,7 @@
}
END_TEST
+
START_TEST (test_RDFAnnotation_deleteCVTerms)
{
XMLNode* node = m->getCompartment(0)->getAnnotation();
@@ -1797,7 +1799,211 @@
END_TEST
+START_TEST (test_RDFAnnotation_removeSingleAnnotation)
+{
+ XMLNode* n1 = NULL;
+
+ int i = m->getCompartment(0)->removeTopLevelAnnotationElement("RDF");
+ n1 = m->getCompartment(0)->getAnnotation();
+
+ fail_unless (i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless (n1 == NULL);
+
+ i = m->getCompartment(2)->removeTopLevelAnnotationElement("JDesignerLayout");
+ n1 = m->getCompartment(2)->getAnnotation();
+
+ fail_unless (i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless (n1 == NULL);
+
+ i = m->getCompartment(3)->removeTopLevelAnnotationElement("RDF", "http://www.w3.org/1999/02/22-rdf-syntax-ns#");
+ n1 = m->getCompartment(3)->getAnnotation();
+
+ fail_unless (i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless (n1 == NULL);
+}
+END_TEST
+
+
+START_TEST (test_RDFAnnotation_removeSingleAnnotation1)
+{
+ XMLNode* n1 = NULL;
+
+
+ int i = m->getCompartment(0)->removeTopLevelAnnotationElement("RDF1");
+ n1 = m->getCompartment(0)->getAnnotation();
+
+ fail_unless (i == LIBSBML_ANNOTATION_NAME_NOT_FOUND);
+ fail_unless (n1->getNumChildren() == 1);
+
+ i = m->getCompartment(2)->removeTopLevelAnnotationElement("JDLayout");
+ n1 = m->getCompartment(2)->getAnnotation();
+
+ fail_unless (i == LIBSBML_ANNOTATION_NAME_NOT_FOUND);
+ fail_unless (n1->getNumChildren() == 1);
+
+ i = m->getCompartment(3)->removeTopLevelAnnotationElement("RDF", "http://www.w3.org/1999/02/22-rdf-syntax-ns");
+ n1 = m->getCompartment(3)->getAnnotation();
+
+ fail_unless (i == LIBSBML_ANNOTATION_NS_NOT_FOUND);
+ fail_unless (n1->getNumChildren() == 1);
+}
+END_TEST
+
+
+START_TEST (test_RDFAnnotation_removeAnnotation)
+{
+ XMLNode* n1 = NULL;
+
+ const char * expected =
+ "<annotation>\n"
+ " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
+ " <rdf:Description rdf:about=\"#_000005\">\n"
+ " <bqbiol:is>\n"
+ " <rdf:Bag>\n"
+ " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n"
+ " </rdf:Bag>\n"
+ " </bqbiol:is>\n"
+ " </rdf:Description>\n"
+ " <rdf:Description>\n"
+ " <rdf:other/>\n"
+ " </rdf:Description>\n"
+ " </rdf:RDF>\n"
+ "</annotation>";
+
+ int i = m->getCompartment(4)->removeTopLevelAnnotationElement("JDesignerLayout");
+ n1 = m->getCompartment(4)->getAnnotation();
+
+ fail_unless(i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless( equals(expected, n1->toXMLString().c_str()) );
+
+ i = m->getListOfCompartments()->removeTopLevelAnnotationElement("RDF");
+ fail_unless(i == LIBSBML_OPERATION_SUCCESS);
+
+}
+END_TEST
+
+
+START_TEST (test_RDFAnnotation_replaceAnnotation)
+{
+ XMLNode* node = m->getCompartment(3)->getAnnotation();
+ XMLNode* n1 = NULL;
+
+ const char * expected =
+ "<annotation>\n"
+ " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
+ " <rdf:Description rdf:about=\"#_000002\">\n"
+ " <bqbiol:is>\n"
+ " <rdf:Bag>\n"
+ " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n"
+ " </rdf:Bag>\n"
+ " </bqbiol:is>\n"
+ " </rdf:Description>\n"
+ " </rdf:RDF>\n"
+ "</annotation>";
+
+ int i = m->getCompartment(0)->replaceTopLevelAnnotationElement(node);
+ n1 = m->getCompartment(0)->getAnnotation();
+
+ fail_unless ( i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless( equals(expected, n1->toXMLString().c_str()) );
+}
+END_TEST
+
+
+START_TEST (test_RDFAnnotation_replaceAnnotation1)
+{
+ XMLNode* n1 = NULL;
+
+ const char * noRDF = "<annotation>\n"
+ " <jd2:JDesignerLayout version=\"2.0\" MajorVersion=\"2\" MinorVersion=\"3\" BuildVersion=\"41\">\n"
+ " <jd2:header>\n"
+ " <jd2:VersionHeader JDesignerVersion=\"2.0\"/>\n"
+ " <jd2:ModelHeader Author=\"Sarah\" ModelVersion=\"0.0\" ModelTitle=\"mine\"/>\n"
+ " <jd2:TimeCourseDetails timeStart=\"0\" timeEnd=\"12\" numberOfPoints=\"1000\"/>\n"
+ " </jd2:header>\n"
+ " </jd2:JDesignerLayout>\n"
+ "</annotation>";
+
+ const char * expected =
+ "<annotation>\n"
+ " <jd2:JDesignerLayout version=\"2.0\" MajorVersion=\"2\" MinorVersion=\"3\" BuildVersion=\"41\">\n"
+ " <jd2:header>\n"
+ " <jd2:VersionHeader JDesignerVersion=\"2.0\"/>\n"
+ " <jd2:ModelHeader Author=\"Sarah\" ModelVersion=\"0.0\" ModelTitle=\"mine\"/>\n"
+ " <jd2:TimeCourseDetails timeStart=\"0\" timeEnd=\"12\" numberOfPoints=\"1000\"/>\n"
+ " </jd2:header>\n"
+ " </jd2:JDesignerLayout>\n"
+ " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
+ " <rdf:Description rdf:about=\"#_000005\">\n"
+ " <bqbiol:is>\n"
+ " <rdf:Bag>\n"
+ " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n"
+ " </rdf:Bag>\n"
+ " </bqbiol:is>\n"
+ " </rdf:Description>\n"
+ " <rdf:Description>\n"
+ " <rdf:other/>\n"
+ " </rdf:Description>\n"
+ " </rdf:RDF>\n"
+ "</annotation>";
+
+ int i = m->getCompartment(4)->replaceTopLevelAnnotationElement(noRDF);
+ n1 = m->getCompartment(4)->getAnnotation();
+
+ fail_unless ( i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless( equals(expected, n1->toXMLString().c_str()) );
+}
+END_TEST
+
+
+START_TEST (test_RDFAnnotation_replaceAnnotation2)
+{
+ XMLNode* n1 = NULL;
+
+ const char * jd = " <jd2:JDesignerLayout version=\"2.0\" MajorVersion=\"2\" MinorVersion=\"3\" BuildVersion=\"41\">\n"
+ " <jd2:header>\n"
+ " <jd2:VersionHeader JDesignerVersion=\"2.0\"/>\n"
+ " <jd2:ModelHeader Author=\"Sarah\" ModelVersion=\"0.0\" ModelTitle=\"mine\"/>\n"
+ " <jd2:TimeCourseDetails timeStart=\"0\" timeEnd=\"12\" numberOfPoints=\"1000\"/>\n"
+ " </jd2:header>\n"
+ " </jd2:JDesignerLayout>";
+
+ const char * twoAnn =
+ "<annotation>\n"
+ " <jd2:JDesignerLayout version=\"2.0\" MajorVersion=\"2\" MinorVersion=\"3\" BuildVersion=\"41\">\n"
+ " <jd2:header>\n"
+ " <jd2:VersionHeader JDesignerVersion=\"2.0\"/>\n"
+ " <jd2:ModelHeader Author=\"Sarah\" ModelVersion=\"0.0\" ModelTitle=\"mine\"/>\n"
+ " <jd2:TimeCourseDetails timeStart=\"0\" timeEnd=\"12\" numberOfPoints=\"1000\"/>\n"
+ " </jd2:header>\n"
+ " </jd2:JDesignerLayout>\n"
+ " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:vCard=\"http://www.w3.org/2001/vcard-rdf/3.0#\" xmlns:bqbiol=\"http://biomodels.net/biology-qualifiers/\" xmlns:bqmodel=\"http://biomodels.net/model-qualifiers/\">\n"
+ " <rdf:Description rdf:about=\"#_000005\">\n"
+ " <bqbiol:is>\n"
+ " <rdf:Bag>\n"
+ " <rdf:li rdf:resource=\"http://www.geneontology.org/#GO:0007274\"/>\n"
+ " </rdf:Bag>\n"
+ " </bqbiol:is>\n"
+ " </rdf:Description>\n"
+ " <rdf:Description>\n"
+ " <rdf:other/>\n"
+ " </rdf:Description>\n"
+ " </rdf:RDF>\n"
+ "</annotation>";
+
+ int i = m->getCompartment(4)->replaceTopLevelAnnotationElement(twoAnn);
+ fail_unless ( i == LIBSBML_INVALID_OBJECT);
+
+ i = m->getCompartment(4)->replaceTopLevelAnnotationElement(jd);
+ n1 = m->getCompartment(4)->getAnnotation();
+
+ fail_unless ( i == LIBSBML_OPERATION_SUCCESS);
+ fail_unless( equals(twoAnn, n1->toXMLString().c_str()) );
+}
+END_TEST
+
+
/* when I rewrote the parsing an annotation that has not been touched
* does not get "recreated" - so I took out these tests
*/
@@ -1833,6 +2039,12 @@
tcase_add_test(tcase, test_RDFAnnotation_testHasHistoryRDFAnnotationBadAbout );
tcase_add_test(tcase, test_RDFAnnotation_testCreateAnnotations );
tcase_add_test(tcase, test_RDFAnnotation_deleteCVTerms );
+ tcase_add_test(tcase, test_RDFAnnotation_removeSingleAnnotation );
+ tcase_add_test(tcase, test_RDFAnnotation_removeSingleAnnotation1 );
+ tcase_add_test(tcase, test_RDFAnnotation_removeAnnotation );
+ tcase_add_test(tcase, test_RDFAnnotation_replaceAnnotation );
+ tcase_add_test(tcase, test_RDFAnnotation_replaceAnnotation1 );
+ tcase_add_test(tcase, test_RDFAnnotation_replaceAnnotation2 );
suite_add_tcase(suite, tcase);
return suite;
Modified: trunk/libsbml/src/sbml/common/operationReturnValues.h
===================================================================
--- trunk/libsbml/src/sbml/common/operationReturnValues.h 2012-04-30 08:29:15 UTC (rev 15739)
+++ trunk/libsbml/src/sbml/common/operationReturnValues.h 2012-04-30 15:22:22 UTC (rev 15740)
@@ -123,6 +123,25 @@
* is being used to add an annotation that has a namespace that is already
* present in the existing annotation. */
+ , LIBSBML_ANNOTATION_NAME_NOT_FOUND = -12
+ /*!< The existing annotation does not have a top-level element with
+ * the given name. This error is
+ * typically returned in situations where the
+ * replaceTopLevelAnnotationElement function or
+ * the removeTopLevelAnnotationElement function
+ * is being used to replace or remove an annotation with a name that does
+ * not match the name of any toplevel element that is already
+ * present in the existing annotation. */
+
+ , LIBSBML_ANNOTATION_NS_NOT_FOUND = -13
+ /*!< The existing annotation does not have a top-level element with
+ * the given namespace. This error is
+ * typically returned in situations where the
+ * replaceTopLevelAnnotationElement function or
+ * the removeTopLevelAnnotationElement function
+ * is being used to replace or remove an annotation with a namespace that does
+ * not match the namespace of any toplevel element that is already
+ * present in the existing annotation. */
/* ---------------------------------------------------------------------------
*
* Return codes for package extension
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fbe...@us...> - 2012-04-30 08:29:22
|
Revision: 15739
http://sbml.svn.sourceforge.net/sbml/?rev=15739&view=rev
Author: fbergmann
Date: 2012-04-30 08:29:15 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
- be sure that we are L3 before logging errors.
Modified Paths:
--------------
trunk/libsbml/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp
Modified: trunk/libsbml/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp
===================================================================
--- trunk/libsbml/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp 2012-04-30 01:03:09 UTC (rev 15738)
+++ trunk/libsbml/src/sbml/extension/SBMLDocumentPluginNotRequired.cpp 2012-04-30 08:29:15 UTC (rev 15739)
@@ -83,14 +83,24 @@
SBMLDocumentPluginNotRequired::readAttributes (const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
+ if (&attributes == NULL || &expectedAttributes == NULL ) return;
+
//If we're reading from a file, the file might erroneously not have set the 'required' flag:
mIsSetRequired = false;
+
SBMLDocumentPlugin::readAttributes(attributes, expectedAttributes);
- //Alternatively, it might have set the 'required' flag to be 'false':
- if (mIsSetRequired && mRequired==true) {
- getErrorLog()
- ->logError(PackageRequiredShouldBeFalse, getLevel(), getVersion());
+ // Layout and render (and presumably more plugins) also have a vital use case for L2 models, we cannot
+ // preclude people from using them by adding the error below.
+ if ( mSBMLExt->getLevel(mURI) > 2)
+ {
+
+ //Alternatively, it might have set the 'required' flag to be 'false':
+ if (mIsSetRequired && mRequired==true)
+ {
+ getErrorLog()
+ ->logError(PackageRequiredShouldBeFalse, getLevel(), getVersion());
+ }
}
}
/** @endcond */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-30 01:03:15
|
Revision: 15738
http://sbml.svn.sourceforge.net/sbml/?rev=15738&view=rev
Author: mhucka
Date: 2012-04-30 01:03:09 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
Minor formatting updates.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-conversion-warnings.html
trunk/libsbml/docs/src/libsbml-java-overview.html
trunk/libsbml/docs/src/libsbml-python-mainpage.txt
Modified: trunk/libsbml/docs/src/libsbml-conversion-warnings.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-conversion-warnings.html 2012-04-29 23:15:26 UTC (rev 15737)
+++ trunk/libsbml/docs/src/libsbml-conversion-warnings.html 2012-04-30 01:03:09 UTC (rev 15738)
@@ -1,3 +1,4 @@
+<center>
<blockquote style="color: #880000; width: 85%; text-align: left;
padding: 4px; width: 85%; text-align: left; border: 1px solid darkred;
-webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px;
@@ -10,3 +11,4 @@
If you encounter undocumented components, you may wish to check the
corresponding text in the C++ API manual.
</blockquote>
+</center>
Modified: trunk/libsbml/docs/src/libsbml-java-overview.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-java-overview.html 2012-04-29 23:15:26 UTC (rev 15737)
+++ trunk/libsbml/docs/src/libsbml-java-overview.html 2012-04-30 01:03:09 UTC (rev 15738)
@@ -36,6 +36,7 @@
http://sbml.org/Software/libSBML/issue-tracker</a>.
</p>
+<center>
<blockquote style="color: #880000; width: 85%; text-align: left;
padding: 4px; width: 85%; text-align: left; border: 1px solid darkred;
-webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px;
@@ -46,6 +47,7 @@
If you encounter undocumented components, you may wish to check the
corresponding text in the C++ API manual.
</blockquote>
+</center>
<h2 style="border: none; background: none; text-shadow: none;
margin-bottom: 0px; -moz-box-shadow: none; -webkit-box-shadow:
@@ -98,3 +100,7 @@
(USA); the Systems Biology Institute (Japan); and Keio University (Japan).
</p>
+<br>
+<p>
+This HTML documentation was generated with
+<a href="http://www.doxygen.org/index.html">Doxygen</a>.
Modified: trunk/libsbml/docs/src/libsbml-python-mainpage.txt
===================================================================
--- trunk/libsbml/docs/src/libsbml-python-mainpage.txt 2012-04-29 23:15:26 UTC (rev 15737)
+++ trunk/libsbml/docs/src/libsbml-python-mainpage.txt 2012-04-30 01:03:09 UTC (rev 15738)
@@ -37,4 +37,6 @@
@htmlinclude FUNDING.txt
+@htmlinclude libsbml-doxygen.html
+
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 23:15:33
|
Revision: 15737
http://sbml.svn.sourceforge.net/sbml/?rev=15737&view=rev
Author: mhucka
Date: 2012-04-29 23:15:26 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Minor clarification.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-accessing.html
Modified: trunk/libsbml/docs/src/libsbml-accessing.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-accessing.html 2012-04-29 23:11:05 UTC (rev 15736)
+++ trunk/libsbml/docs/src/libsbml-accessing.html 2012-04-29 23:15:26 UTC (rev 15737)
@@ -61,6 +61,13 @@
setenv LD_LIBRARY_PATH /usr/local/lib
</pre>
+On Mac OS X, this would instead be
+
+<pre class="fragment">
+setenv DYLD_LIBRARY_PATH /usr/local/lib
+</pre>
+
+
</li></ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 23:11:13
|
Revision: 15736
http://sbml.svn.sourceforge.net/sbml/?rev=15736&view=rev
Author: mhucka
Date: 2012-04-29 23:11:05 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Updated for difference in site-packages vs dist-packages installation
directory of python when Ubuntu is involved.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-installation.html.in
Modified: trunk/libsbml/docs/src/libsbml-installation.html.in
===================================================================
--- trunk/libsbml/docs/src/libsbml-installation.html.in 2012-04-29 23:10:48 UTC (rev 15735)
+++ trunk/libsbml/docs/src/libsbml-installation.html.in 2012-04-29 23:11:05 UTC (rev 15736)
@@ -1150,13 +1150,26 @@
<nobr><em><span class="placeholder">DIR</span></em><code>/lib/perl5/site_perl/</code><em><span class="placeholder">perl-version</span></em><code>/</code><em><span class="placeholder">platform</span></em><code>/</code></nobr></td>
<td>(2)</td>
</tr><tr>
- <td>Python</td>
+ <td>Python<br>(Ubuntu 11)</td>
<td>
<nobr><em>(native C++ library)</em></nobr><br>
<nobr><em>(Python module file)</em></nobr><br>
<nobr><em>(Compiled module file)</em></nobr><br>
<nobr><em>(Path configuration file)</em></nobr>
</td>
+ <td><nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/dist-packages/libsbml/</code></nobr><br>
+ <nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/dist-packages/libsbml/</code></nobr><br>
+ <nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/dist-packages/libsbml/</code></nobr><br>
+ <nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/dist-packages/</code></nobr></td>
+ <td>(2)</td>
+</tr><tr>
+ <td>Python<br>(Other Linuxes)</td>
+ <td>
+ <nobr><em>(native C++ library)</em></nobr><br>
+ <nobr><em>(Python module file)</em></nobr><br>
+ <nobr><em>(Compiled module file)</em></nobr><br>
+ <nobr><em>(Path configuration file)</em></nobr>
+ </td>
<td><nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/site-packages/libsbml/</code></nobr><br>
<nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/site-packages/libsbml/</code></nobr><br>
<nobr><em><span class="placeholder">DIR</span></em><code>/lib/</code><em><span class="placeholder">python-version</span></em><code>/site-packages/libsbml/</code></nobr><br>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 23:10:56
|
Revision: 15735
http://sbml.svn.sourceforge.net/sbml/?rev=15735&view=rev
Author: mhucka
Date: 2012-04-29 23:10:48 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Updated for difference in site-packages vs dist-packages installation
directory of python when Ubuntu is involved.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-accessing.html
Modified: trunk/libsbml/docs/src/libsbml-accessing.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-accessing.html 2012-04-29 22:19:24 UTC (rev 15734)
+++ trunk/libsbml/docs/src/libsbml-accessing.html 2012-04-29 23:10:48 UTC (rev 15735)
@@ -305,34 +305,50 @@
<p> Once that is done, and libSBML has been installed on your system, then
Python needs just one more thing to be informed where to find the libSBML
package: it needs the environment variable named <code>PYTHONPATH</code> to
-be set. On Unix-based systems at least, if <em><span
-class="placeholder">DIR</span></em> is the value of the
+be set. If <em><span class="placeholder">DIR</span></em> is the value of the
<nobr><code>--prefix=</code><em><span
class="placeholder">DIR</span></em></nobr> option given during
configuration of libSBML and <em><span
class="placeholder">version</span></em> is the version of your copy of
Python, then the value of <code>PYTHONPATH</code> needs to be set as
-follows:
+follows on Ubuntu 11 systems:
<pre class="fragment" style="font-size: 12px">
export PYTHONPATH=<u><em><span
class="placeholder">DIR</span></em></u>/lib/<u><em><span class="placeholder">version</span></em></u>/site-packages
</pre>
-for <i>sh</i>-based shells such as Bash, or
+and as follows for other Linux systems:
<pre class="fragment" style="font-size: 12px">
+export PYTHONPATH=<u><em><span
+class="placeholder">DIR</span></em></u>/lib/<u><em><span class="placeholder">version</span></em></u>/dist-packages
+</pre>
+
+The above is for <i>sh</i>-based shells such as Bash; if you use
+<i>csh</i>-based shells, then the appropriate syntax is instead
+
+<pre class="fragment" style="font-size: 12px">
setenv PYTHONPATH <u><em><span
class="placeholder">DIR</span></em></u>/lib/<u><em><span class="placeholder">version</span></em></u>/site-packages
</pre>
-for <i>csh</i>-based shells. In other words, the <code>PYTHONPATH</code>
-environment variable needs to be set to the
-<nobr><code>site-packages</code></nobr> directory path where the libSBML
-library has been installed. Please see the section titled "<a
-href="libsbml-installation.html#locations">Files installed by libSBML, and
-their locations</a>" elsewhere in this manual for more information about
-the files installed for libSBML.
+and
+
+<pre class="fragment" style="font-size: 12px">
+setenv PYTHONPATH <u><em><span
+class="placeholder">DIR</span></em></u>/lib/<u><em><span class="placeholder">version</span></em></u>/dist-packages
+</pre>
+
+for Ubuntu 11 and non-Ubuntu systems, respectively. In other words,
+the <code>PYTHONPATH</code> environment variable needs to be set to the
+<nobr><code>site-packages</code></nobr> or
+<nobr><code>dist-packages</code></nobr> (depending on the flavor of Linux)
+directory path where the libSBML library has been installed. Please see
+the section titled "<a href="libsbml-installation.html#locations">Files
+installed by libSBML, and their locations</a>" elsewhere in this manual for
+more information about the files installed for libSBML.
+
<p> Once the <code>PYTHONPATH</code> variable has been set, you should be
able to start the Python interpreter and type the following command to
import the libSBML package for Python:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 22:19:31
|
Revision: 15734
http://sbml.svn.sourceforge.net/sbml/?rev=15734&view=rev
Author: mhucka
Date: 2012-04-29 22:19:24 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Added note about the fact that you need to have not just the libxml2
distribution but also the libxml2-dev distribution on linux.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-installation.html.in
Modified: trunk/libsbml/docs/src/libsbml-installation.html.in
===================================================================
--- trunk/libsbml/docs/src/libsbml-installation.html.in 2012-04-29 21:49:46 UTC (rev 15733)
+++ trunk/libsbml/docs/src/libsbml-installation.html.in 2012-04-29 22:19:24 UTC (rev 15734)
@@ -182,16 +182,21 @@
target="_blank" href="http://xmlsoft.org">libxml2</a> XML library; if you
do not have libxml2 version 2.6.16 or later on your system, the
<code>configure</code> program will terminate with an error explaining it
-cannot find libxml2. In that case, you can inform the
-<code>configure</code> program to use the <a target="_blank"
+cannot find libxml2. (<em>Important</em>: libSBML needs the development
+libraries for libxml2, not only the runtime library, which on systems such
+as Linux means that you need to have installed <em>both</em> the basic
+libxml2 distribution and the <code>-dev</code> distribution. These
+distributions typically have the root names <code>libxml2</code>
+and <code>libxml2-dev</code>, often followed by a version number.)
+
+<p> Instead of using libxml2, you can inform the <code>configure</code>
+program to use the <a target="_blank"
href="http://expat.sourceforge.net/">Expat</a> or <a target="_blank"
-href="http://http://xerces.apache.org/xerces-c/">Xerces</a> libraries
-instead. Many Linux and other UNIX-like systems provide one or more of
-these libraries either as part of their standard distribution or as an
-optional RPM, Debian, Mandrake or other package distributions. (Libxml2
-appears to be the most commonly available library on Linux and
-Mac OS X systems.) To use Expat, run the libSBML configuration
-program as follows:
+href="http://http://xerces.apache.org/xerces-c/">Xerces</a> libraries.
+Many Linux and other UNIX-like systems provide one or more of these
+libraries either as part of their standard distribution or as an optional
+RPM, Debian, Mandrake or other package distributions. To use Expat, run
+the libSBML configuration program as follows:
<div class="fragment"><pre class="fragment">
./configure --with-expat
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 21:49:52
|
Revision: 15733
http://sbml.svn.sourceforge.net/sbml/?rev=15733&view=rev
Author: mhucka
Date: 2012-04-29 21:49:46 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
For javadoc and python, need to remove the @~ we use as a hack to work
around a doxygen space-eating bug.
Modified Paths:
--------------
trunk/libsbml/src/bindings/swig/swigdoc.py
Modified: trunk/libsbml/src/bindings/swig/swigdoc.py
===================================================================
--- trunk/libsbml/src/bindings/swig/swigdoc.py 2012-04-29 21:48:27 UTC (rev 15732)
+++ trunk/libsbml/src/bindings/swig/swigdoc.py 2012-04-29 21:49:46 UTC (rev 15733)
@@ -1004,6 +1004,12 @@
docstring = rewriteCommonReferences(docstring)
+ # Remove @~, which we use as a hack in Doxygen 1.7-1.8
+
+ docstring = docstring.replace(r'@~', '')
+
+ # Take out the C++ comment start and end.
+
docstring = docstring.replace('/**', '').replace('*/', '')
p = re.compile('^(\s*)\*([ \t]*)', re.MULTILINE)
docstring = p.sub(r'\2', docstring)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 21:48:33
|
Revision: 15732
http://sbml.svn.sourceforge.net/sbml/?rev=15732&view=rev
Author: mhucka
Date: 2012-04-29 21:48:27 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Made the bottom navigation bar be gray rather than blue.
Also made a tweak or two to other element's appearances.
Modified Paths:
--------------
trunk/libsbml/docs/src/doxygen-base-stylesheet.css
Modified: trunk/libsbml/docs/src/doxygen-base-stylesheet.css
===================================================================
--- trunk/libsbml/docs/src/doxygen-base-stylesheet.css 2012-04-29 21:47:40 UTC (rev 15731)
+++ trunk/libsbml/docs/src/doxygen-base-stylesheet.css 2012-04-29 21:48:27 UTC (rev 15732)
@@ -28,8 +28,13 @@
color: #443;
}
-h2 a.anchor, h3 a.anchor, h4 a.anchor {
+h2 {
+ padding-bottom: 2px;
+}
+
+h2 a.anchor, h3 a.anchor, h4 a.anchor, h2 a:hover, h3 a:hover, h4 a:hover {
color: #443;
+ text-decoration: none;
}
h3, h3 a {
@@ -753,12 +758,13 @@
.navpath ul
{
font-size: 11px;
- background-image:url('tab_b.png');
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#bbb),color-stop(0.5, #ddd));
+ background-image: -moz-linear-gradient(center top, #f8f8f8 0%, #ddd 50%, #bbb);
background-repeat:repeat-x;
height:30px;
line-height:30px;
- color:#8AA0CC;
- border:solid 1px #C2CDE4;
+ color: #93a1b8;
+ border: solid 1px #93a1b8;
overflow:hidden;
margin:0px;
padding:0px;
@@ -1305,3 +1311,7 @@
margin-left: 1cm;
margin-top: 0;
}
+
+div.contents hr {
+ margin: 2em 0 2em 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 21:47:46
|
Revision: 15731
http://sbml.svn.sourceforge.net/sbml/?rev=15731&view=rev
Author: mhucka
Date: 2012-04-29 21:47:40 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Changed the look of the middle resize bar. The default was too blue, which
didn't go well with the grayer theme I put together.
Modified Paths:
--------------
trunk/libsbml/docs/src/doxygen-navtree.css
Modified: trunk/libsbml/docs/src/doxygen-navtree.css
===================================================================
--- trunk/libsbml/docs/src/doxygen-navtree.css 2012-04-29 21:46:13 UTC (rev 15730)
+++ trunk/libsbml/docs/src/doxygen-navtree.css 2012-04-29 21:47:40 UTC (rev 15731)
@@ -93,7 +93,8 @@
}
.ui-resizable-e {
- background:url("ftv2splitbar.png") repeat scroll right center transparent;
+ background-color: #bbb;
+ border-right: 1px dotted #666;
cursor:e-resize;
height:100%;
right:0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 21:46:19
|
Revision: 15730
http://sbml.svn.sourceforge.net/sbml/?rev=15730&view=rev
Author: mhucka
Date: 2012-04-29 21:46:13 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Minor typesetting fix.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-reading-files.txt
Modified: trunk/libsbml/docs/src/libsbml-reading-files.txt
===================================================================
--- trunk/libsbml/docs/src/libsbml-reading-files.txt 2012-04-29 14:27:49 UTC (rev 15729)
+++ trunk/libsbml/docs/src/libsbml-reading-files.txt 2012-04-29 21:46:13 UTC (rev 15730)
@@ -187,16 +187,16 @@
provides the class SBMLWriter for this purpose, and SBMLWriter offers the
following methods:
-@li bool <code>SBMLWriter::writeSBMLToFile(const SBMLDocument* d, const std::string& filename)</code>
+@li <code>bool SBMLWriter::writeSBMLToFile(const SBMLDocument* d, const std::string& filename)</code>
writes the given SBML document to the named file and returns either @c true
on success or @c false on failure. Reasons for failure can be, for
example, that the named file could not be opened for writing.
-@li char* <code>SBMLWriter::writeSBMLToString(const SBMLDocument* d)
+@li <code>char* SBMLWriter::writeSBMLToString(const SBMLDocument* d)
</code> writes the given SBML document to a character string and returns a
pointer to it, or returns @c NULL if a failure occurred. The string is
owned by the caller and should be freed (using the standard C function
<code>free()</code>) after it is no longer needed.
-@li bool <code>SBMLWriter::writeSBML(const SBMLDocument* d, std::ostream& stream)</code>
+@li <code>bool SBMLWriter::writeSBML(const SBMLDocument* d, std::ostream& stream)</code>
writes the given SBML document to the given output stream and returns
either @c true on success or @c false on failure.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-04-29 14:27:56
|
Revision: 15729
http://sbml.svn.sourceforge.net/sbml/?rev=15729&view=rev
Author: sarahkeating
Date: 2012-04-29 14:27:49 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
add an example of L3 parser in C
Modified Paths:
--------------
trunk/libsbml/examples/c/translateMath.c
trunk/libsbml/examples/c/util.c
Added Paths:
-----------
trunk/libsbml/examples/c/translateL3Math.c
Added: trunk/libsbml/examples/c/translateL3Math.c
===================================================================
--- trunk/libsbml/examples/c/translateL3Math.c (rev 0)
+++ trunk/libsbml/examples/c/translateL3Math.c 2012-04-29 14:27:49 UTC (rev 15729)
@@ -0,0 +1,195 @@
+/**
+ * @file translateL3Math.c
+ * @brief Translates infix formulas into MathML and vice-versa, using the L3 parser instead of the old L1 parser.
+ * @author Sarah Keating
+ * @author Ben Bornstein
+ *
+ *
+ * This file is part of libSBML. Please visit http://sbml.org for more
+ * information about SBML, and the latest version of libSBML.
+ */
+
+
+#include <iostream>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <sbml/SBMLTypes.h>
+#include "util.h"
+
+
+#define BUFFER_SIZE 1024
+
+
+using namespace std;
+LIBSBML_CPP_NAMESPACE_USE
+
+char *translateInfix (const char *formula, L3ParserSettings_t* settings);
+char *translateMathML (const char *xml);
+
+
+int
+main (int argc, char* argv[])
+{
+ char *line;
+ char *result;
+ char *buffer = (char*)calloc( 1, sizeof(char) );
+ unsigned long len;
+ int reading = 1;
+ SBMLDocument_t* doc = NULL;
+ StringBuffer_t* sb = StringBuffer_create(1024);
+
+
+ printf( "\n" );
+ printf( "This program translates infix formulas into MathML and\n" );
+ printf( "vice-versa. An 'enter' or a 'return' on an empty line\n" );
+ printf( "triggers translation.\n" );
+ printf( "\n" );
+
+ L3ParserSettings_t* settings = L3ParserSettings_create();
+ while (reading)
+ {
+ printf( "Enter infix formula, MathML expression, \n");
+ printf( "or change parsing rules with the keywords:\n");
+ printf( "LOG_AS_LOG10, LOG_AS_LN, LOG_AS_ERROR, EXPAND_UMINUS, ");
+ printf( "COLLAPSE_UMINUS, TARGETL2, TARGETL3, NO_UNITS, UNITS, ");
+ printf( "or FILE:<filename>\n\n\n" );
+ printf( "> " );
+
+ do
+ {
+ line = trim_whitespace(get_line(stdin));
+ len = (unsigned int)strlen(line);
+
+ if (len > 0)
+ {
+ buffer = (char *) realloc( buffer, 1 + strlen(buffer) + len );
+
+ if (strcmp(line, "LOG_AS_LOG10")==0) {
+ L3ParserSettings_setParseLog(settings, L3P_PARSE_LOG_AS_LOG10);
+ printf( "Now parsing 'log(x)' as 'log10(x)'\n\n> ");
+ }
+ else if (strcmp(line, "LOG_AS_LN")==0) {
+ L3ParserSettings_setParseLog(settings, L3P_PARSE_LOG_AS_LN);
+ printf( "Now parsing 'log(x)' as 'ln(x)'\n\n> ");
+ }
+ else if (strcmp(line, "LOG_AS_ERROR")==0) {
+ L3ParserSettings_setParseLog(settings, L3P_PARSE_LOG_AS_ERROR);
+ printf( "Now parsing 'log(x)' as an error\n\n> ");
+ }
+ else if (strcmp(line, "EXPAND_UMINUS")==0) {
+ L3ParserSettings_setCollapseMinus(settings, 0);
+ printf( "Will now leave multiple unary minuses expanded, ");
+ printf("and all negative numbers will be translated using the ");
+ printf("<minus> construct.\n\n> ");
+ }
+ else if (strcmp(line, "COLLAPSE_UMINUS")==0) {
+ L3ParserSettings_setCollapseMinus(settings, 1);
+ printf( "Will now collapse multiple unary minuses, and incorporate ");
+ printf("a negative sign into digits.\n\n> ");
+ }
+ else if (strcmp(line, "TARGETL2")==0) {
+ L3ParserSettings_setTargetL2(settings );
+ printf( "Will now target SBML Level 2 MathML, with no units on ");
+ printf("numbers, and no csymbol 'avogadro'.\n\n> ");
+ }
+ else if (strcmp(line, "NO_UNITS")==0) {
+ L3ParserSettings_setParseUnits(settings, 0);
+ printf( "Will now target MathML but with no units on numbers.\n\n> ");
+ }
+ else if (strcmp(line, "UNITS")==0) {
+ L3ParserSettings_setParseUnits(settings, 1);
+ printf( "Will now target MathML but with units on numbers.\n\n> ");
+ }
+ else if (strcmp(line, "TARGETL3")==0) {
+ L3ParserSettings_setTargetL3(settings);
+ printf( "Will now target SBML Level 3 MathML, including having ");
+ printf("units on numbers, and the csymbol 'avogadro'.\n\n> ");;
+ }
+ else if (line[0] == 'F' && line[1] == 'I' && line[2]=='L'
+ && line[3]=='E' && line[4]==':') {
+ string filename(line);
+ filename = filename.substr(5, filename.size());
+ delete doc;
+ doc = readSBMLFromFile(filename.c_str());
+ if (SBMLDocument_getModel(doc)==NULL) {
+ printf( "File '%s' not found or no model present.", filename);
+ printf( "Clearing the Model parsing object.\n\n> ");
+ }
+ else {
+ printf( "Using model from file %s to parse infix:", filename);
+ printf( "all symbols present in that model will not be translated ");
+ printf( "as native MathML or SBML-defined elements.\n\n> ");;
+ }
+ L3ParserSettings_setModel(settings, SBMLDocument_getModel(doc));
+ }
+ else
+ {
+ strncat(buffer, line, len);
+ strncat(buffer, "\n", 1);
+ }
+ }
+ else
+ {
+ result = (buffer[0] == '<') ?
+ translateMathML(buffer) : translateInfix(buffer, settings);
+
+ printf("Result:\n\n%s\n\n\n", result);
+
+ free(result);
+ reading = 0;
+ }
+ }
+ while (len > 0);
+
+ }
+
+ free(line);
+ return 0;
+}
+
+
+/**
+ * Translates the given infix formula into MathML.
+ *
+ * @return the MathML as a string. The caller owns the memory and is
+ * responsible for freeing it.
+ */
+char *
+translateInfix (const char* formula, L3ParserSettings_t* settings)
+{
+ char* result;
+ ASTNode* math = SBML_parseL3FormulaWithSettings(formula, settings);
+
+ if (math==NULL) {
+ result = SBML_getLastParseL3Error();
+ }
+ else {
+ result = writeMathMLToString(math);
+ ASTNode_free(math);
+ }
+ return result;
+}
+
+
+/**
+ * Translates the given MathML into an infix formula. The MathML must
+ * contain no leading whitespace, but an XML header is optional.
+ *
+ * @return the infix formula as a string. The caller owns the memory and
+ * is responsible for freeing it.
+ */
+char *
+translateMathML (const char* xml)
+{
+ char* result;
+ ASTNode_t* math;
+
+ math = readMathMLFromString(xml);
+ result = SBML_formulaToString(math);
+
+ ASTNode_free(math);
+ return result;
+}
Modified: trunk/libsbml/examples/c/translateMath.c
===================================================================
--- trunk/libsbml/examples/c/translateMath.c 2012-04-29 14:23:04 UTC (rev 15728)
+++ trunk/libsbml/examples/c/translateMath.c 2012-04-29 14:27:49 UTC (rev 15729)
@@ -115,7 +115,7 @@
if (xml[0] == '<' && xml[1] != '?')
{
char *header = "<?xml version='1.0' encoding='UTF-8'?>\n";
- char *content = calloc( strlen(xml) + strlen(header) + 1, sizeof(char) );
+ char *content = (char *) calloc( strlen(xml) + strlen(header) + 1, sizeof(char) );
strncat(content, header, strlen(header));
strncat(content, xml, strlen(xml));
Modified: trunk/libsbml/examples/c/util.c
===================================================================
--- trunk/libsbml/examples/c/util.c 2012-04-29 14:23:04 UTC (rev 15728)
+++ trunk/libsbml/examples/c/util.c 2012-04-29 14:27:49 UTC (rev 15729)
@@ -138,7 +138,7 @@
cp = strchr( s, '\n' );
if ( cp != NULL ) *cp = '\0';
if ( line == NULL )
- line = calloc( 1+strlen(s), sizeof(char) );
+ line = (char *) calloc( 1+strlen(s), sizeof(char) );
else
line = (char *)realloc( line, 1+strlen( s )+strlen( line ) );
strcat( line, s );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sar...@us...> - 2012-04-29 14:23:10
|
Revision: 15728
http://sbml.svn.sourceforge.net/sbml/?rev=15728&view=rev
Author: sarahkeating
Date: 2012-04-29 14:23:04 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Tracker issue # 3515246
Added a known issue that if you build Exapt with CMake and then use configure with libsbml you get a header version mismatch. Building Expat with gnumake avoids the problem. Thanks to Raimund R?\195?\182nn for reporting this.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-issues.html
Modified: trunk/libsbml/docs/src/libsbml-issues.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-issues.html 2012-04-29 05:25:43 UTC (rev 15727)
+++ trunk/libsbml/docs/src/libsbml-issues.html 2012-04-29 14:23:04 UTC (rev 15728)
@@ -116,6 +116,16 @@
another issue: different versions of the underlying XML parsers may behave
differently in the face of unusual (though not necessarily illegal) inputs.
+<li style="margin-bottom: 1em">Expat 2.1.0 appears to have a configuration
+issue. If CMake is used to compile the expat library and configure is
+used to configure libSBML the system reports <code>
+checking for Expat version >= 1.95.8...
+*** The Expat header file (version 2.1.0) does not match
+*** the Expat library found (version 2.0.1).</code>. However if the gnumake
+./configure, make & make install is used to build the Expat library the
+header mismatch is avoided.
+
+
</ol>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 05:25:49
|
Revision: 15727
http://sbml.svn.sourceforge.net/sbml/?rev=15727&view=rev
Author: mhucka
Date: 2012-04-29 05:25:43 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Quick updates about documentation changes.
Modified Paths:
--------------
trunk/libsbml/NEWS.txt
Modified: trunk/libsbml/NEWS.txt
===================================================================
--- trunk/libsbml/NEWS.txt 2012-04-29 05:22:54 UTC (rev 15726)
+++ trunk/libsbml/NEWS.txt 2012-04-29 05:25:43 UTC (rev 15727)
@@ -50,11 +50,18 @@
* Miscellaneous
- - Doxygen versions 1.7 and 1.8 are now supported. (However, older
- versions of Doxygen are no longer supported.)
+ - The uninstallation instructions were out of date. This is now
+ updated, for example to mention that the Mac OS X installer does
+ in fact provide an uninstall script.
* Configuration/build system changes
+ - Doxygen versions 1.7 and 1.8 are now supported, but due to
+ differences in the new version, older versions of Doxygen are no
+ longer supported. The 'configure' script will now only accept
+ version 1.7 at minimum.
+
+
EXPERIMENTAL RELEASE
* New features
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 05:23:00
|
Revision: 15726
http://sbml.svn.sourceforge.net/sbml/?rev=15726&view=rev
Author: mhucka
Date: 2012-04-29 05:22:54 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Updated the uninstallation instructions to be aligned with current reality.
Modified Paths:
--------------
trunk/libsbml/docs/src/libsbml-uninstallation.html
Modified: trunk/libsbml/docs/src/libsbml-uninstallation.html
===================================================================
--- trunk/libsbml/docs/src/libsbml-uninstallation.html 2012-04-29 00:00:45 UTC (rev 15725)
+++ trunk/libsbml/docs/src/libsbml-uninstallation.html 2012-04-29 05:22:54 UTC (rev 15726)
@@ -4,10 +4,13 @@
<tr><td style="font-size: small;">
<ul>
<li style="font-size: small;"><a href="#uninstall-unix">Uninstalling
-libSBML on Linux, Mac OS X, Cygwin, and Solaris</a></li>
+libSBML on Linux, Cygwin, and similar Unix-like systems</a></li>
<li style="font-size: small;"><a href="#uninstall-windows">Uninstalling
libSBML on Windows</a></li>
+
+<li style="font-size: small;"><a href="#uninstall-macos">Uninstalling
+libSBML on Mac OS X</a></li>
</ul>
</td>
</tr>
@@ -20,8 +23,8 @@
instructions below depending on the kind of operating system involved.
-<h3><a class="anchor" name="uninstall-unix">Linux, Mac OS X, and
-Solaris</a></h3>
+<h3><a class="anchor" name="uninstall-unix">Linux, Cygwin and similar
+Unix-like systems</a></h3>
<p>
The libSBML build system comes with a command for uninstalling libSBML
@@ -51,14 +54,37 @@
<h3><a class="anchor" name="uninstall-windows">Windows</a></h3>
-<p>As part of the installation process on Windows, the libSBML installer
-program places an uninstaller program in the top-level folder where libSBML
-is installed. This uninstaller is named <code>Uninstall_libSBML.bat</code>.
-</p>
+<p>On Windows, you have two possible approaches for uninstalling libSBML.
+You can use either approach.
+<ol>
-<p>To uninstall libSBML on Windows systems, navigate to the libSBML
-installation folder (which might be, for example, <code>C:\Program
-Files\SBML\libSBML-3.1.1-expat</code>) and execute
-<code>Uninstall_libSBML.bat</code>. It will remove the files installed
-by the libSBML Windows installer.
-</p>
+<li>The first approach is to use the regular Windows <em>add/remove
+software</em> interface, available in the Windows control panel.
+
+<li>The second is to use libSBML's uninstaller directly. As part of the
+installation process on Windows, the libSBML installer program places an
+uninstaller program in the top-level folder where libSBML is installed.
+This uninstaller is named <code>Uninstall_libSBML.bat</code>. To use it,
+navigate to the libSBML installation folder (which might be, for example,
+<code>C:\Program Files\SBML\libSBML-3.1.1-expat</code>) and execute
+<code>Uninstall_libSBML.bat</code>. It will remove the files installed by
+the libSBML Windows installer.
+
+</ol>
+
+
+<h3><a class="anchor" name="uninstall-macos">Mac OS X</a></h3>
+
+<p>The Mac OS X installer for libSBML places an uninstall script in the
+<code>bin</code> subdirectory of the location where you installed libSBML.
+(This location is <code>/usr/local</code> by default.) To run the
+uninstaller, start a terminal shell and type the following command at the
+prompt:
+
+<pre class="fragment">
+ sudo /usr/local/bin/uninstall-libsbml-pkg.sh
+</pre>
+
+<p>If, on the other hand, you built and installed libSBML from the source
+distribution, then you can use the <nobr><code>make uninstall</code></nobr>
+command <a href="#uninstall-unix">mentioned above</a>.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 00:00:52
|
Revision: 15725
http://sbml.svn.sourceforge.net/sbml/?rev=15725&view=rev
Author: mhucka
Date: 2012-04-29 00:00:45 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
Added missing period.
Modified Paths:
--------------
trunk/libsbml/src/sbml/math/FormulaTokenizer.h
Modified: trunk/libsbml/src/sbml/math/FormulaTokenizer.h
===================================================================
--- trunk/libsbml/src/sbml/math/FormulaTokenizer.h 2012-04-28 23:59:52 UTC (rev 15724)
+++ trunk/libsbml/src/sbml/math/FormulaTokenizer.h 2012-04-29 00:00:45 UTC (rev 15725)
@@ -77,7 +77,7 @@
* translate formulas between this text-string representation and MathML.
* The principal entry points to the translation system are
* @if clike SBML_formulaToString()@endif@if csharp SBML_formulaToString()@endif@if python libsbml.formulaToString()@endif@if java <code><a href="libsbml.html#formulaToString(org.sbml.libsbml.ASTNode)">libsbml.formulaToString()</a></code>@endif@~
- * and @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href="libsbml.html#parseFormula(java.lang.String)">libsbml.parseFormula()</a></code>@endif@~
+ * and @if clike SBML_parseFormula()@endif@if csharp SBML_parseFormula()@endif@if python libsbml.parseFormula()@endif@if java <code><a href="libsbml.html#parseFormula(java.lang.String)">libsbml.parseFormula()</a></code>@endif@~.
*
* LibSBML also provides a lower-level interface to the formula parser.
* This takes the form of the C functions
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-29 00:00:00
|
Revision: 15724
http://sbml.svn.sourceforge.net/sbml/?rev=15724&view=rev
Author: mhucka
Date: 2012-04-28 23:59:52 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Removed extra @endcond.
Modified Paths:
--------------
trunk/libsbml/src/sbml/FunctionDefinition.cpp
Modified: trunk/libsbml/src/sbml/FunctionDefinition.cpp
===================================================================
--- trunk/libsbml/src/sbml/FunctionDefinition.cpp 2012-04-28 23:59:07 UTC (rev 15723)
+++ trunk/libsbml/src/sbml/FunctionDefinition.cpp 2012-04-28 23:59:52 UTC (rev 15724)
@@ -1009,7 +1009,6 @@
/** @cond doxygen-c-only */
-
/**
* Creates a new FunctionDefinition_t structure using the given SBML @p level
* and @p version values.
@@ -1453,7 +1452,6 @@
}
/** @endcond */
-/** @endcond */
LIBSBML_CPP_NAMESPACE_END
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-28 23:59:13
|
Revision: 15723
http://sbml.svn.sourceforge.net/sbml/?rev=15723&view=rev
Author: mhucka
Date: 2012-04-28 23:59:07 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Fixed some list spacing issues introduced by the switch to Doxygen 1.8.
Modified Paths:
--------------
trunk/libsbml/src/sbml/AlgebraicRule.h
trunk/libsbml/src/sbml/AssignmentRule.h
trunk/libsbml/src/sbml/RateRule.h
trunk/libsbml/src/sbml/Rule.h
Modified: trunk/libsbml/src/sbml/AlgebraicRule.h
===================================================================
--- trunk/libsbml/src/sbml/AlgebraicRule.h 2012-04-28 23:56:38 UTC (rev 15722)
+++ trunk/libsbml/src/sbml/AlgebraicRule.h 2012-04-28 23:59:07 UTC (rev 15723)
@@ -85,10 +85,8 @@
*
* @li @link RuleType_t#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
* the rule is a "rate" rule.
- *
* @li @link RuleType_t#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
* Indicates the rule is a "scalar" rule.
- *
* @li @link RuleType_t#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
* Indicates the rule type is unknown or not yet set.
*
Modified: trunk/libsbml/src/sbml/AssignmentRule.h
===================================================================
--- trunk/libsbml/src/sbml/AssignmentRule.h 2012-04-28 23:56:38 UTC (rev 15722)
+++ trunk/libsbml/src/sbml/AssignmentRule.h 2012-04-28 23:59:07 UTC (rev 15723)
@@ -131,10 +131,8 @@
*
* @li @link RuleType_t#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
* the rule is a "rate" rule.
- *
* @li @link RuleType_t#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
* Indicates the rule is a "scalar" rule.
- *
* @li @link RuleType_t#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
* Indicates the rule type is unknown or not yet set.
*
Modified: trunk/libsbml/src/sbml/RateRule.h
===================================================================
--- trunk/libsbml/src/sbml/RateRule.h 2012-04-28 23:56:38 UTC (rev 15722)
+++ trunk/libsbml/src/sbml/RateRule.h 2012-04-28 23:59:07 UTC (rev 15723)
@@ -108,10 +108,8 @@
*
* @li @link RuleType_t#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
* the rule is a "rate" rule.
- *
* @li @link RuleType_t#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
* Indicates the rule is a "scalar" rule.
- *
* @li @link RuleType_t#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
* Indicates the rule type is unknown or not yet set.
*
Modified: trunk/libsbml/src/sbml/Rule.h
===================================================================
--- trunk/libsbml/src/sbml/Rule.h 2012-04-28 23:56:38 UTC (rev 15722)
+++ trunk/libsbml/src/sbml/Rule.h 2012-04-28 23:59:07 UTC (rev 15723)
@@ -60,10 +60,8 @@
*
* @li @link RuleType_t#RULE_TYPE_RATE RULE_TYPE_RATE@endlink: Indicates
* the rule is a "rate" rule.
- *
* @li @link RuleType_t#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink:
* Indicates the rule is a "scalar" rule.
- *
* @li @link RuleType_t#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink:
* Indicates the rule type is unknown or not yet set.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-28 23:56:44
|
Revision: 15722
http://sbml.svn.sourceforge.net/sbml/?rev=15722&view=rev
Author: mhucka
Date: 2012-04-28 23:56:38 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
Closed some <a> elements that were left unclosed.
Modified Paths:
--------------
trunk/libsbml/docs/src/common-text/rules-additional-restrictions.html
Modified: trunk/libsbml/docs/src/common-text/rules-additional-restrictions.html
===================================================================
--- trunk/libsbml/docs/src/common-text/rules-additional-restrictions.html 2012-04-28 21:55:34 UTC (rev 15721)
+++ trunk/libsbml/docs/src/common-text/rules-additional-restrictions.html 2012-04-28 23:56:38 UTC (rev 15722)
@@ -5,7 +5,7 @@
of assignments in a model, and the second concerns overdetermined systems.
<h3><a class="anchor" id="no-algebraic-loops">A model must not contain
-algebraic loops</h3>
+algebraic loops</a></h3>
The combined set of InitialAssignment, AssignmentRule and KineticLaw
objects in a model constitute a set of assignment statements that should be
@@ -35,7 +35,7 @@
+ 100</em>.
<h3><a class="anchor" id="no-overdetermined">A model must not be
-overdetermined</h3>
+overdetermined</a></h3>
An SBML model must not be overdetermined; that is, a model must not
define more equations than there are unknowns in a model. An SBML model
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-28 21:55:40
|
Revision: 15721
http://sbml.svn.sourceforge.net/sbml/?rev=15721&view=rev
Author: mhucka
Date: 2012-04-28 21:55:34 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
The documentation was not properly conditionalized for C and consequently
ended up in the C++ docs (duplicating what was already being added by the
.h file). Fixed.
Modified Paths:
--------------
trunk/libsbml/src/sbml/math/FormulaParser.c
Modified: trunk/libsbml/src/sbml/math/FormulaParser.c
===================================================================
--- trunk/libsbml/src/sbml/math/FormulaParser.c 2012-04-28 21:55:00 UTC (rev 15720)
+++ trunk/libsbml/src/sbml/math/FormulaParser.c 2012-04-28 21:55:34 UTC (rev 15721)
@@ -293,8 +293,8 @@
/** @endcond */
+/** @cond doxygen-c-only */
/**
- * @if doxygen-c-only
* Parses the given SBML formula and returns a representation of it as an
* Abstract Syntax Tree (AST).
*
@@ -370,7 +370,6 @@
* parsing the formula
*
* @see SBML_formulaToString()
- * @endif
*/
LIBSBML_EXTERN
ASTNode_t *
@@ -451,11 +450,11 @@
return node;
}
+/** @endcond */
/** @cond doxygen-libsbml-internal */
-
/**
* @return the action for the current state and token.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-28 21:55:06
|
Revision: 15720
http://sbml.svn.sourceforge.net/sbml/?rev=15720&view=rev
Author: mhucka
Date: 2012-04-28 21:55:00 +0000 (Sat, 28 Apr 2012)
Log Message:
-----------
The documentation was not properly conditionalized for C and consequently
ended up in the C++ docs (duplicating what was already being added by the
.h file). Fixed.
Modified Paths:
--------------
trunk/libsbml/src/sbml/math/FormulaFormatter.c
Modified: trunk/libsbml/src/sbml/math/FormulaFormatter.c
===================================================================
--- trunk/libsbml/src/sbml/math/FormulaFormatter.c 2012-04-27 23:36:24 UTC (rev 15719)
+++ trunk/libsbml/src/sbml/math/FormulaFormatter.c 2012-04-28 21:55:00 UTC (rev 15720)
@@ -34,8 +34,9 @@
# define isnan(d) _isnan(d)
#endif
+
+/** @cond doxygen-c-only */
/**
- * @if doxygen-c-only
* Converts an AST to a string representation of a formula using a syntax
* basically derived from SBML Level 1.
*
@@ -110,8 +111,7 @@
* mathematical formula. The caller owns the returned string and is
* responsible for freeing it when it is no longer needed.
*
- * SBML_parseFormula()
- * @endif
+ * @see SBML_parseFormula()
*/
LIBSBML_EXTERN
char *
@@ -133,6 +133,7 @@
}
return s;
}
+/** @endcond */
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-27 23:36:31
|
Revision: 15719
http://sbml.svn.sourceforge.net/sbml/?rev=15719&view=rev
Author: mhucka
Date: 2012-04-27 23:36:24 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
Fixed places where I forgot to update a stylesheet filename.
Modified Paths:
--------------
trunk/libsbml/docs/src/Makefile.in
Modified: trunk/libsbml/docs/src/Makefile.in
===================================================================
--- trunk/libsbml/docs/src/Makefile.in 2012-04-27 23:18:57 UTC (rev 15718)
+++ trunk/libsbml/docs/src/Makefile.in 2012-04-27 23:36:24 UTC (rev 15719)
@@ -558,7 +558,7 @@
# between doxygen and javadoc. Let's ignore the warnings to avoid
# confusing users.
-java-ignorable-warnings = "warning - @param argument|Custom tags that could"
+java-ignorable-warnings = "warning - @param argument|Custom tags that could|@~ is an unknown tag"
# 2011-02-13 <mh...@ca...> We now do an evil work-around for the
# problem that SWIG refuses to attach documentation to certain things:
@@ -590,14 +590,14 @@
-windowtitle $(javadoc-windowtitle) \
-doctitle $(javadoc-doctitle) \
-overview libsbml-java-fake-overview.html \
- -stylesheetfile doxygen-base.css \
+ -stylesheetfile doxygen-base-stylesheet.css \
-d $(java-manual) \
-tag note:a:"Note:" \
-tag warning:a:"Warning:" \
-tag docnote:a:"Documentation note:" \
-sourcepath $(java-local-dir) org.sbml.libsbml \
2>&1 | egrep -v $(java-ignorable-warnings)
- cp -f doxygen-base.css $(java-manual)
+ cp -f doxygen-base-stylesheet.css $(java-manual)
cp -f $(logo-file) $(java-manual)
cp -f $(logo-file) $(java-manual)/$(java-class-path)/
cp -f graphics/*.png $(java-manual)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-27 23:19:04
|
Revision: 15718
http://sbml.svn.sourceforge.net/sbml/?rev=15718&view=rev
Author: mhucka
Date: 2012-04-27 23:18:57 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
People using the distribution would end up requiring swig because of a
dependency on ../swig/libsbml-package.i, which was always getting updated.
Let's remove the wildcard and just depend on ../swig/libsbml.i.
Modified Paths:
--------------
trunk/libsbml/src/bindings/python/Makefile.in
Modified: trunk/libsbml/src/bindings/python/Makefile.in
===================================================================
--- trunk/libsbml/src/bindings/python/Makefile.in 2012-04-27 22:25:50 UTC (rev 15717)
+++ trunk/libsbml/src/bindings/python/Makefile.in 2012-04-27 23:18:57 UTC (rev 15718)
@@ -283,7 +283,7 @@
libsbml.py: libsbml_wrap.cpp
-pydoc-doxygen.i: $(swig_sources) $(main_sources) ../swig/swigdoc.py doc-converter/rewrite_pydoc.py $(wildcard ../swig/*.i)
+pydoc-doxygen.i: $(swig_sources) $(main_sources) ../swig/swigdoc.py doc-converter/rewrite_pydoc.py ../swig/libsbml.i
../swig/swigdoc.py python -I../.. -D../../../docs/src ../swig/libsbml.i pydoc-doxygen.i
pydoc-normal.i: pydoc-doxygen.i
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mh...@us...> - 2012-04-27 22:25:56
|
Revision: 15717
http://sbml.svn.sourceforge.net/sbml/?rev=15717&view=rev
Author: mhucka
Date: 2012-04-27 22:25:50 +0000 (Fri, 27 Apr 2012)
Log Message:
-----------
Minor python look and feel tweak to method signature blocks.
Modified Paths:
--------------
trunk/libsbml/docs/src/doxygen-base-stylesheet.css
Modified: trunk/libsbml/docs/src/doxygen-base-stylesheet.css
===================================================================
--- trunk/libsbml/docs/src/doxygen-base-stylesheet.css 2012-04-27 22:21:06 UTC (rev 15716)
+++ trunk/libsbml/docs/src/doxygen-base-stylesheet.css 2012-04-27 22:25:50 UTC (rev 15717)
@@ -381,7 +381,7 @@
hr {
height: 0px;
border: none;
- border-top: 1px solid #4A6AAA;
+ border-top: 1px solid #443;
}
hr.footer {
@@ -1291,7 +1291,7 @@
pre.signature {
font-size: 14px;
font-weight: bold;
- margin-left: 5ex;
+ margin-left: 16px;
}
.signatureArrow {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|