musrfit 1.10.0
PFunctionGrammar.h File Reference
#include <boost/version.hpp>
#include "PFunctionAst.h"
#include <boost/spirit/home/x3.hpp>
Include dependency graph for PFunctionGrammar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  musrfit::grammar::additive_op_
 Symbol table for additive operators (+ and -). More...
 
struct  musrfit::grammar::multiplicative_op_
 Symbol table for multiplicative operators (* and /). More...
 
struct  musrfit::grammar::fun_tok_
 Symbol table for mathematical function names. More...
 
struct  musrfit::grammar::const_tok_
 Symbol table for named constants. More...
 

Namespaces

namespace  musrfit::grammar
 Boost.Spirit X3 grammar definitions for parsing function expressions.
 
namespace  musrfit
 Top-level namespace for musrfit components.
 

Functions

auto const & musrfit::function_grammar ()
 Provides access to the top-level grammar rule.
 

Variables

additive_op_ musrfit::grammar::additive_op
 Global instance of additive operator symbol table.
 
multiplicative_op_ musrfit::grammar::multiplicative_op
 Global instance of multiplicative operator symbol table.
 
fun_tok_ musrfit::grammar::fun_tok
 Global instance of function name symbol table.
 
const_tok_ musrfit::grammar::const_tok
 Global instance of constant name symbol table.
 
x3::rule< class assignment, ast::assignment > const musrfit::grammar::assignment = "assignment"
 Top-level rule: FUN# = expression.
 
x3::rule< class expression, ast::expression > const musrfit::grammar::expression = "expression"
 Expression with addition/subtraction (lowest precedence)
 
x3::rule< class term, ast::expression > const musrfit::grammar::term = "term"
 Term with multiplication/division (higher precedence)
 
x3::rule< class factor, ast::operand > const musrfit::grammar::factor = "factor"
 Factor: literal, constant, parameter, function, or parenthesized expression (highest precedence)
 
x3::rule< class constant, ast::constant > const musrfit::grammar::constant = "constant"
 Constant: PI, GAMMA_MU, B, EN, or T#.
 
x3::rule< class parameter, ast::parameter > const musrfit::grammar::parameter = "parameter"
 Parameter reference: PAR# or -PAR#.
 
x3::rule< class map_ref, ast::map_ref > const musrfit::grammar::map = "map"
 Map reference: MAP# or -MAP#.
 
x3::rule< class function_call, ast::function_call > const musrfit::grammar::function = "function"
 Function call: FUNC(expression)
 
x3::rule< class power_call, ast::power_call > const musrfit::grammar::power = "power"
 Power operation: POW(base, exponent)
 
auto const musrfit::grammar::assignment_def
 Assignment rule: FUN# = expression.
 
auto const musrfit::grammar::expression_def
 Expression rule: term ((+|-) term)*.
 
auto const musrfit::grammar::term_def
 Term rule: factor ((*|/) factor)*.
 
auto const musrfit::grammar::factor_def
 Factor rule: the atomic elements of expressions.
 
auto const musrfit::grammar::constant_def
 Constant rule: PI | GAMMA_MU | B | -B | EN | -EN | T# | -T#.
 
auto const musrfit::grammar::parameter_def
 Parameter rule: PAR# | -PAR#.
 
auto const musrfit::grammar::map_def
 Map rule: MAP# | -MAP#.
 
auto const musrfit::grammar::function_def
 Function rule: FUNC(expression)
 
auto const musrfit::grammar::power_def
 Power rule: POW(base, exponent)