Package org.languagetool.tools

Examples of org.languagetool.tools.SymbolLocator


          final boolean noException = isNoException(token, tokens, i, j,
                  precededByWhitespace, followedByWhitespace);

          if (noException && precededByWhitespace
                  && token.equals(startSymbols[j])) {
            symbolStack.push(new SymbolLocator(startSymbols[j], i));
            break;
          } else if (noException && followedByWhitespace
                  && token.equals(endSymbols[j])) {
            if (i > 1 && endSymbols[j].equals(")")
                    && (numerals.matcher(tokens[i - 1].getToken()).matches()
                    && !(!symbolStack.empty()
                    && "(".equals(symbolStack.peek().symbol)))) {
            } else {
              if (symbolStack.empty()) {
                symbolStack.push(new SymbolLocator(endSymbols[j], i));
                break;
              } else {
                if (symbolStack.peek().symbol.equals(startSymbols[j])) {
                  symbolStack.pop();
                  break;
                } else {
                  if (isEndSymbolUnique(endSymbols[j])) {
                    symbolStack.push(new SymbolLocator(endSymbols[j], i));
                    break;
                  } else {
                    if (j == endSymbols.length - 1) {
                      symbolStack.push(new SymbolLocator(endSymbols[j], i));
                      break;
                    }
                  }
                }
              }
View Full Code Here

TOP

Related Classes of org.languagetool.tools.SymbolLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.