Commit d3a56511 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

Ainur: optional _ before keyword allowed

parent cb075007
......@@ -67,8 +67,9 @@ Ainur::Ainur(String str)
value %= qi::lexeme[+(qi::char_ - qi::char_(";"))];
aToZ = ascii::char_("a","z") | ascii::char_("A", "Z");
zeroToNine = ascii::char_("0","9");
typeQualifier %= +(aToZ | ascii::char_(".") | ascii::char_("!"));
keywords = +aToZ >> *(ascii::char_("a","z")
keywords = *(ascii::char_("_")) >> +aToZ >> *(ascii::char_("a","z")
| ascii::char_("A", "Z")
| ascii::char_("0","9")
| ascii::char_(":")
......
......@@ -63,6 +63,10 @@ private:
static std::complex<RealType> toComplex(std::string str)
{
typedef std::complex<RealType> ComplexType;
if (str == "i") return ComplexType(0., 1.);
if (str == "-i") return ComplexType(0., -1.);
String buffer;
bool flag = false;
const SizeType n = str.length();
......
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