protected void parseOperationsL ( TokenList tokens , Sequence sequence ) { if ( tokens . size == 0 ) return ; TokenList . Token token = tokens . first ; if ( token . getType ( ) != Type . VARIABLE ) throw new ParseError ( "The first token in an equation needs to be a variable and not " + token ) ; while ( token != null ) { if ( token . getType ( ) == Type . FUNCTION ) { throw new ParseError ( "Function encountered with no parentheses" ) ; } else if ( token . getType ( ) == Type . SYMBOL && token . getSymbol ( ) == Symbol . TRANSPOSE ) { if ( token . previous . getType ( ) == Type . VARIABLE ) token = insertTranspose ( token . previous , tokens , sequence ) ; else throw new ParseError ( "Expected variable before transpose" ) ; } token = token . next ; } }
Parses operations where the input comes from variables to its left only . Hard coded to only look for transpose for now