Commit 7bcaf629 authored by kraus's avatar kraus
Browse files

fixing stand-alone mslang parser

parent 3b82921e
......@@ -69,7 +69,7 @@ void FlexibleCollimator::accept(BeamlineVisitor &visitor) const {
bool FlexibleCollimator::isStopped(const Vector_t &R, const Vector_t &P, double recpgamma) {
const double z = R(2);
const double z = R(2);// + P(2) * recpgamma;
if ((z < 0.0) ||
(z > getElementLength()) ||
......
......@@ -6,6 +6,8 @@
#include <gsl/gsl_rng.h>
#include <boost/regex.hpp>
#include <iostream>
#include <string>
#include <fstream>
......@@ -35,7 +37,10 @@ int main(int argc, char *argv[])
// std::string str("repeat( translate(union(rectangle(0.1, 0.1), ellipse(0.1, 0.1)), -0.01, -0.02), 2, 0.1, 0.2)");
if (parse(str, fun)) {
str = boost::regex_replace(str, boost::regex("//.*?\\n"), std::string(""), boost::match_default | boost::format_all);
str = boost::regex_replace(str, boost::regex("\\s"), std::string(""), boost::match_default | boost::format_all);
if (parse(str, fun)) {
fun->print(0);
std::cout << "\n" << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment