SeExpr
ExprParser.h
Go to the documentation of this file.
1 /*
2  Copyright Disney Enterprises, Inc. All rights reserved.
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License
6  and the following modification to it: Section 6 Trademarks.
7  deleted and replaced with:
8 
9  6. Trademarks. This License does not grant permission to use the
10  trade names, trademarks, service marks, or product names of the
11  Licensor and its affiliates, except as required for reproducing
12  the content of the NOTICE file.
13 
14  You may obtain a copy of the License at
15  http://www.apache.org/licenses/LICENSE-2.0
16 */
17 #ifndef ExprParser_h
18 #define ExprParser_h
19 
20 #ifndef MAKEDEPEND
21 #include <string>
22 #endif
23 
24 namespace SeExpr2 {
25 class ExprNode;
26 class Expression;
27 bool ExprParse(SeExpr2::ExprNode*& parseTree,
28  std::string& error,
29  int& errorStart,
30  int& errorEnd,
31  std::vector<std::pair<int, int> >& _comments,
33  const char* str,
34  bool wantVec = true);
35 }
36 
37 #endif
</pre >< h2 > Evaluating expressions</h2 > Evaluating an expression is pretty easy But before we can do that we need to make an instance< pre > GrapherExpr expr("x+x^2")
bool ExprParse(SeExpr2::ExprNode *&parseTree, std::string &error, int &errorStart, int &errorEnd, std::vector< std::pair< int, int > > &_comments, const SeExpr2::Expression *expr, const char *str, bool wantVec=true)
main expression class
Definition: Expression.h:76