--- trunk/src/selection/SelectionCompiler.hpp 2005/02/02 23:13:11 281 +++ trunk/src/selection/SelectionCompiler.hpp 2005/02/07 19:13:18 295 @@ -66,7 +66,7 @@ namespace oopse { clausePrimitive ::= clauseComparator | clauseWithin | - clauseChemObject | + clauseName | none | all | ( clauseOr ) @@ -75,25 +75,10 @@ namespace oopse { clauseWithin ::= WITHIN ( clauseDistance , expression ) clauseDistance ::= integer | decimal - - clauseChemObject::= {clauseMolecule} | {clauseStuntDouble} + + clauseName::= *|string{.string{.string}} - clauseMolecule ::= {clauseMolName} | {clauseMolIndex} - clauseMolName ::= molname clauseName - - clauseName::= *|string - - clauseMolIndex ::= molindex clauseIndex - - clauseIndex ::= integer {- integer } - - clauseStuntDouble ::= {clauseStuntDoubleName} | {clauseStuntDoubleIndex} - - clauseStuntDoubleName ::= name clauseName - - clauseStuntDoubleIndex ::= index clauseIndex - * */ class SelectionCompiler{ @@ -132,7 +117,7 @@ class SelectionCompiler{ bool lookingAtLeadingWhitespace(); - bool lookingAtComment(); + //bool lookingAtComment(); bool lookingAtEndOfLine(); bool lookingAtEndOfStatement(); bool lookingAtString(); @@ -154,9 +139,9 @@ class SelectionCompiler{ bool clausePrimitive(); bool clauseWithin(); bool clauseComparator(); - bool clauseName(int tok); - bool clauseIndex(int tok); - + bool clauseChemObjName(); + bool clauseName(std::string& name); + bool clauseIndex(); Token tokenNext(); boost::any valuePeek(); int tokPeek(); @@ -220,8 +205,8 @@ class SelectionCompiler{ return compileError("comparison operator expected"); } - bool integerExpected() { - return compileError("integer expected"); + bool numberExpected() { + return compileError("number expected"); } bool numberOrKeywordExpected() {