Commit 3059611119633dc1e2aaf55a5b8b5fc02a0acde0
1 parent
04d84599
Exists in
master
and in
87 other branches
Parser: show error location
Showing
2 changed files
with
26 additions
and
26 deletions
Show diff stats
src/expressionParser/ExpressionParser.cc
@@ -28,7 +28,7 @@ std::string ExpressionParser::parse(const std::string& str, AMDA::helpers::Prope | @@ -28,7 +28,7 @@ std::string ExpressionParser::parse(const std::string& str, AMDA::helpers::Prope | ||
28 | 28 | ||
29 | if(!result || iter != end) | 29 | if(!result || iter != end) |
30 | { | 30 | { |
31 | - LOG4CXX_ERROR(gLogger, "ExpressionParser::parse - Cannot parse the expression") | 31 | + LOG4CXX_ERROR(gLogger, "ExpressionParser::parse - Cannot parse the expression at -> " << std::string(iter + 1, str.end())) |
32 | return ""; | 32 | return ""; |
33 | } | 33 | } |
34 | 34 |
test/parser/amda_parser_cdpp3.csv
@@ -20,30 +20,30 @@ cass_b_krtp(1)-1/cass_r_sat^3*21153*sin(@pi/2-cass_lat_sat*@pi/180)+3/2/cass_r_s | @@ -20,30 +20,30 @@ cass_b_krtp(1)-1/cass_r_sat^3*21153*sin(@pi/2-cass_lat_sat*@pi/180)+3/2/cass_r_s | ||
20 | cass_b_krtp(0)-2/cass_r_sat^3*21153*cos(@pi/2-cass_lat_sat*@pi/180)+3/cass_r_sat^4*1576*3/2*((cos(@pi/2-cass_lat_sat*@pi/180))^2-1/3)+4/cass_r_sat^5*2267*5/2*cos(@pi/2-cass_lat_sat*@pi/180)*((cos(@pi/2-cass_lat_sat*@pi/180))^2-9/15); | 20 | cass_b_krtp(0)-2/cass_r_sat^3*21153*cos(@pi/2-cass_lat_sat*@pi/180)+3/cass_r_sat^4*1576*3/2*((cos(@pi/2-cass_lat_sat*@pi/180))^2-1/3)+4/cass_r_sat^5*2267*5/2*cos(@pi/2-cass_lat_sat*@pi/180)*((cos(@pi/2-cass_lat_sat*@pi/180))^2-9/15); |
21 | ((sat_sw_pdyn-0.1)>0)=1;((($sat_sw_pdyn-0.1)>0)==1) | 21 | ((sat_sw_pdyn-0.1)>0)=1;((($sat_sw_pdyn-0.1)>0)==1) |
22 | mes_bmag_orb1m-shiftT_(mes_bmag_orb,300);"($mes_bmag_orb1m-#timeShift($mes_bmag_orb;300))" | 22 | mes_bmag_orb1m-shiftT_(mes_bmag_orb,300);"($mes_bmag_orb1m-#timeShift($mes_bmag_orb;300))" |
23 | -shiftT_(mes_bmag_orb,300); | 23 | +shiftT_(mes_bmag_orb,300);"#timeShift($mes_bmag_orb;300)" |
24 | mes_b_orbmso1m(0)*shiftT_(mes_b_orbmso1m(0),300)<0 & mes_xyz_orbmso(0)<0 & mes_fips_scanprot(10)>100000 & mes_mercury_r<3; | 24 | mes_b_orbmso1m(0)*shiftT_(mes_b_orbmso1m(0),300)<0 & mes_xyz_orbmso(0)<0 & mes_fips_scanprot(10)>100000 & mes_mercury_r<3; |
25 | -mes_bmag_orb1s-mean_sm_(mes_bmag_orb,120); | ||
26 | -mes_fips_scanprot(3); | ||
27 | -shiftT_(mes_bmag_orb1s,180); | ||
28 | -mes_bmag_orb1s-shiftT_(mes_bmag_orb1s,180); | ||
29 | -1e-15*omni5_sw_v_gse*(omni5_imf(1)*omni5_imf(1)+omni5_imf(2)*omni5_imf(2))/@mu_0; | ||
30 | -(@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1)))); | ||
31 | -sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9; | 25 | +mes_bmag_orb1s-mean_sm_(mes_bmag_orb,120);"($mes_bmag_orb1s-#sliding_average($mes_bmag_orb;120))" |
26 | +mes_fips_scanprot(3);$mes_fips_scanprot[3] | ||
27 | +shiftT_(mes_bmag_orb1s,180);"#timeShift($mes_bmag_orb1s;180)" | ||
28 | +mes_bmag_orb1s-shiftT_(mes_bmag_orb1s,180);"($mes_bmag_orb1s-#timeShift($mes_bmag_orb1s;180))" | ||
29 | +1e-15*omni5_sw_vgse*(omni5_imf(1)*omni5_imf(1)+omni5_imf(2)*omni5_imf(2))/@mu_0; | ||
30 | +(@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1))));((3.14159/2)-atan(($imf_gsm[2]/abs($imf_gsm[1])))) | ||
31 | +sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9;((((($sw_n*(9.1e-31))*$sw_vb)*$sw_vb)*(1e15))*(1e9)) | ||
32 | (10.22+1.29*tanh(0.184*(imf_gsm(2)+8.14))*sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9^(-1/6.6))*2^(0.58-0.007*imf_gsm(2))*(1+0.024*alog10(sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9)); | 32 | (10.22+1.29*tanh(0.184*(imf_gsm(2)+8.14))*sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9^(-1/6.6))*2^(0.58-0.007*imf_gsm(2))*(1+0.024*alog10(sw_n*9.1e-31*sw_vb*sw_vb*1e15*1e9)); |
33 | 1e-6*sw_vb*imf_mag^2*(sin((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1))))/2))^4*(6380*1000*(10.22+1.29*tanh(0.184*(imf_gsm(2)+8.14))*ws_pressiondyn^(-1/6.6))*2^(0.58-0.007*imf_gsm(2))*(1+0.024*alog10(ws_pressiondyn)))^2; | 33 | 1e-6*sw_vb*imf_mag^2*(sin((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1))))/2))^4*(6380*1000*(10.22+1.29*tanh(0.184*(imf_gsm(2)+8.14))*ws_pressiondyn^(-1/6.6))*2^(0.58-0.007*imf_gsm(2))*(1+0.024*alog10(ws_pressiondyn)))^2; |
34 | --atan(omni5_imf(0)/omni5_imf(2))*180/@pi; | ||
35 | -pcn/pcs; | 34 | +-atan(omni5_imf(0)/omni5_imf(2))*180/@pi;(-atan(($omni5_imf[0]/$omni5_imf[2]))*(180/3.14159)) |
35 | +pcn/pcs;($pcn/$pcs) | ||
36 | ((sw_vb*1e-3)^(4/3))*((1e-9*imf_mag)^(2/3))*((sin(((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1)))))/2))^(8/3))*@pi*(7*6380*1000)^2; | 36 | ((sw_vb*1e-3)^(4/3))*((1e-9*imf_mag)^(2/3))*((sin(((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1)))))/2))^(8/3))*@pi*(7*6380*1000)^2; |
37 | (1e-6)*sw_vb*(imf_mag^2)*((sin((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1))))/2))^4)*@pi*(7*6380*1000)^2; | 37 | (1e-6)*sw_vb*(imf_mag^2)*((sin((@pi/2)-(atan(imf_gsm(2)/abs(imf_gsm(1))))/2))^4)*@pi*(7*6380*1000)^2; |
38 | -c1_b_gse_gsm(2); | ||
39 | -ds1_b_gsm(2); | ||
40 | -abs(omni5_sw_e); | 38 | +c1_b_gse(2); |
39 | +ds1_b_gsm(2);$ds1_b_gsm[2] | ||
40 | +abs(omni5_sw_e);abs($omni5_sw_e) | ||
41 | wsd_Ne_B*wsd_Te_B; | 41 | wsd_Ne_B*wsd_Te_B; |
42 | wsd_Ne_B/abs(omni5_sw_e); | 42 | wsd_Ne_B/abs(omni5_sw_e); |
43 | wsd_Te_A; | 43 | wsd_Te_A; |
44 | wsd_Ne_A; | 44 | wsd_Ne_A; |
45 | -1.e6*(1./ros_cg_r)^2; | ||
46 | -sqrt(ros_sc_xyz(0)^2+ros_sc_xyz(1)^2+ros_sc_xyz(2)^2); | 45 | +1.e6*(1./ros_cg_r)^2;((1.e6)*pow((1./$ros_cg_r),2)) |
46 | +sqrt(ros_sc_xyz(0)^2+ros_sc_xyz(1)^2+ros_sc_xyz(2)^2);sqrt(((pow($ros_sc_xyz[0],2)+pow($ros_sc_xyz[1],2))+pow($ros_sc_xyz[2],2))) | ||
47 | c1_hia_vtot/ws_c_ms; | 47 | c1_hia_vtot/ws_c_ms; |
48 | c1_hia_dens*1.d6*c1_hia_v(0)*1.d3; | 48 | c1_hia_dens*1.d6*c1_hia_v(0)*1.d3; |
49 | c1_whi_ne*1.d6*c1_hia_v(0)*1.d3; | 49 | c1_whi_ne*1.d6*c1_hia_v(0)*1.d3; |
@@ -57,9 +57,9 @@ c1_whi_ne*1.d6*c1_hia_v(0)*1.d3; | @@ -57,9 +57,9 @@ c1_whi_ne*1.d6*c1_hia_v(0)*1.d3; | ||
57 | sqrt(2*@k*c1_hia_t*@eV2K/@m_p)/1000; | 57 | sqrt(2*@k*c1_hia_t*@eV2K/@m_p)/1000; |
58 | sqrt(ros_ob_20hz(0)+14*ros_ob_20hz(0)+14+ros_ob_20hz(1)+15*ros_ob_20hz(1)+15+ros_ob_20hz(2)*ros_ob_20hz(2)); | 58 | sqrt(ros_ob_20hz(0)+14*ros_ob_20hz(0)+14+ros_ob_20hz(1)+15*ros_ob_20hz(1)+15+ros_ob_20hz(2)*ros_ob_20hz(2)); |
59 | sqrt(ros_ob_20hz(0)+14*ros_ob_20hz(0)+14+ros_ob_20hz(1)+15*ros_ob_20hz(1)+15+ros_ob_20hz(2)*ros_ob_20hz(2)); | 59 | sqrt(ros_ob_20hz(0)+14*ros_ob_20hz(0)+14+ros_ob_20hz(1)+15*ros_ob_20hz(1)+15+ros_ob_20hz(2)*ros_ob_20hz(2)); |
60 | -ros_ob_20hz(2); | ||
61 | -ros_ob_20hz(0)+14; | ||
62 | -ros_ob_20hz(1)+15; | 60 | +ros_ob_20hz(2);$ros_ob_20hz[2] |
61 | +ros_ob_20hz(0)+14;($ros_ob_20hz[0]+14) | ||
62 | +ros_ob_20hz(1)+15;($ros_ob_20hz[1]+15) | ||
63 | sqrt(2.d0*@k*(c1_hia_t*@eV2K)/@m_p)/1.d3; | 63 | sqrt(2.d0*@k*(c1_hia_t*@eV2K)/@m_p)/1.d3; |
64 | c1_b_gsetot*1.d-9/sqrt(@mu_0*c1_hia_dens*1.d6*@m_p)/1.d3; | 64 | c1_b_gsetot*1.d-9/sqrt(@mu_0*c1_hia_dens*1.d6*@m_p)/1.d3; |
65 | b_sws10_mag/sqrt(@mu_0*rho_sws10); | 65 | b_sws10_mag/sqrt(@mu_0*rho_sws10); |
@@ -72,13 +72,13 @@ lep_g(4)/(b_g(3)/sqrt(@mu_0*lep_g(0))); | @@ -72,13 +72,13 @@ lep_g(4)/(b_g(3)/sqrt(@mu_0*lep_g(0))); | ||
72 | (c1_h_dens*1.e6*@q_e*(c1_h_t(0)+c1_h_t(1))/2)*1.e9; | 72 | (c1_h_dens*1.e6*@q_e*(c1_h_t(0)+c1_h_t(1))/2)*1.e9; |
73 | c1_h_dens*1.e6*@q_e*(c1_h_t(0)+c1_h_t(1))/2/((c1_b_gsetot*1.e-9)^2/(4*3.14*1.e-7)); | 73 | c1_h_dens*1.e6*@q_e*(c1_h_t(0)+c1_h_t(1))/2/((c1_b_gsetot*1.e-9)^2/(4*3.14*1.e-7)); |
74 | c1_h_dens*1.e6*(c1_h_t(0)-c1_h_t(1))*@q_e*1.e18*@mu_0/c1_b_gsetot^2; | 74 | c1_h_dens*1.e6*(c1_h_t(0)-c1_h_t(1))*@q_e*1.e18*@mu_0/c1_b_gsetot^2; |
75 | -@rad2deg*acos(imf_gsm(2)/imf_mag); | ||
76 | -@rad2deg*acos( imf_gsm(0)/sqrt( imf_gsm(0)*imf_gsm(0) +imf_gsm(1)*imf_gsm(1) ) ); | ||
77 | -sw_n*sw_vb*sw_vb*0.00000167; | ||
78 | -@rad2deg*acos(omni5_imf(2)/omni5_imf_mag) ; | ||
79 | -@rad2deg*acos( omni5_imf(0)/sqrt( omni5_imf(0)*omni5_imf(0) +omni5_imf(1)*omni5_imf(1) ) ); | ||
80 | -c4_h_t(1)/c4_h_t(0); | ||
81 | -c3_hia_tperp/c3_hia_tpar; | 75 | +@rad2deg*acos(imf_gsm(2)/imf_mag);(57.2958*acos(($imf_gsm[2]/$imf_mag))) |
76 | +@rad2deg*acos( imf_gsm(0)/sqrt( imf_gsm(0)*imf_gsm(0) +imf_gsm(1)*imf_gsm(1) ) );(57.2958*acos(($imf_gsm[0]/sqrt((($imf_gsm[0]*$imf_gsm[0])+($imf_gsm[1]*$imf_gsm[1])))))) | ||
77 | +sw_n*sw_vb*sw_vb*0.00000167;((($sw_n*$sw_vb)*$sw_vb)*0.00000167) | ||
78 | +@rad2deg*acos(omni5_imf(2)/omni5_imf_mag) ;(57.2958*acos(($omni5_imf[2]/$omni5_imf_mag))) | ||
79 | +@rad2deg*acos( omni5_imf(0)/sqrt( omni5_imf(0)*omni5_imf(0) +omni5_imf(1)*omni5_imf(1) ) );(57.2958*acos(($omni5_imf[0]/sqrt((($omni5_imf[0]*$omni5_imf[0])+($omni5_imf[1]*$omni5_imf[1])))))) | ||
80 | +c4_h_t(1)/c4_h_t(0);($c4_h_t[1]/$c4_h_t[0]) | ||
81 | +c3_hia_tperp/c3_hia_tpar;($c3_hia_tperp/$c3_hia_tpar) | ||
82 | sqrt( ( c3_xyz_gse(0)-c4_xyz_gse(0) )^2 + ( c3_xyz_gse(1)-c4_xyz_gse(1) )^2 + ( c3_xyz_gse(2)-c4_xyz_gse(2) )^2)*@Re*0.001; | 82 | sqrt( ( c3_xyz_gse(0)-c4_xyz_gse(0) )^2 + ( c3_xyz_gse(1)-c4_xyz_gse(1) )^2 + ( c3_xyz_gse(2)-c4_xyz_gse(2) )^2)*@Re*0.001; |
83 | sqrt((5/3*c1_hia_t*@q_e)/@m_p)/1000; | 83 | sqrt((5/3*c1_hia_t*@q_e)/@m_p)/1000; |
84 | c1_btot/sqrt(@m_p*@mu_0*c1_hia_dens*1000000); | 84 | c1_btot/sqrt(@m_p*@mu_0*c1_hia_dens*1000000); |