Feature/issue 648 pow infix syntax

#### Summary:

This change adds the exponentiation operator to the Stan modeling language, so that you can write x^y instead of pow(x,y).

#### Intended Effect:

Stan models which involve exponentiation will be written differently.  Expressions which involve raising an integer or real to an integer or real power can be written using the ^ infix operator.   The result of this operation is a real variable.  The ^ operator binds more tightly than unary negation or any of the binary operators.  so a*b^c is interpreted as a*(b^c), -a^b as -(a^b), and a^b^c as a^(b^c).

#### How to Verify:

Unit tests have been added to src/test/gm/parser_test.cpp.   Tested by adding exponent statements to simple models and running command line Stan.
#### Side Effects:

No.

#### Documentation:

The Stan manual, section modeling language, expressions has been updated to include documentation of the infix exponent operator.  No other sections have been changed.  No example models.

#### Reviewer Suggestions:

Changes to the parser require some understanding of Boost Spirit/Qi.  Bob or Marcus?


yes, left by mistake.  should be removed.

but ran example below in RStan, and didn't get output "local" -
running R for Mac Os X, Version 3.1.0 2014-04-10, R.app 1.64
here's what I get on the Rapp console:


> library(rstan)
Loading required package: Rcpp
Loading required package: inline

Attaching package: 'inline'

The following object is masked from 'package:Rcpp':

     registerPlugin

rstan (Version 2.3.0, packaged: 2014-06-23 19:44:07 UTC, GitRev: 5dd1fe5a323a)
> stanc(model_code="transformed data{int a; int b;} parameters {real c;} 
model { real d; d + <- 2.1/1.1; }") -> a

TRANSLATING MODEL 'anon_model' FROM Stan CODE TO C++ CODE NOW.
>

cheers,
Mitzi


On Thu, 26 Jun 2014, Marco Inacio wrote:

>>
>> +    struct exponentiation_expr {
>> +      template <typename T1, typename T2, typename T3, typename T4, typename T5>
>> +      struct result { typedef void type; };
>> +
>> +      void operator()(expression& expr1,
>> +                      const expression& expr2,
>> +                      const var_origin& var_origin,
>> +                      bool& pass,
>> +                      std::ostream& error_msgs) const {
>> +
>> +        //        if (expr1.expression_type().is_vector()
>> +        //            && !expr2.expression_type().is_primitive()) {
>> +        // handle raising each member of a vector to a power?
>> +        // }
>> +        print_var_origin(error_msgs,var_origin);
>
> Was this line left here by mistake? It seems to be outputting "local" after parsing.
>
> Simple example (RStan):
>
> stanc(model_code="transformed data{int a; int b;} parameters {real c;} model { real d; d <- 2.1/1.1; }") -> a
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/stan-dev/stan/pull/681/files#r14258045