FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also "+MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE() throws ScanException { CompositeNode compositeNode = new CompositeNode(); Node childNode = E(); // System.out.println("Child node: " + childNode); compositeNode.setChildNode(childNode); Token t = getNextToken(); // System.out.println("Next token is" + t); if (t.getType() != Token.RIGHT_PARENTHESIS) { throw new IllegalStateException( "Expecting RIGHT_PARENTHESIS token but got " + t); } else { // System.out.println("got expected ')'"); } return compositeNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
@SuppressWarnings("unchecked") FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = ot.getOptionsList(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); SimpleKeywordNode keywordNode = new SimpleKeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode SINGLE() throws ScanException { // System.out.println("in SINGLE()"); Token t = getNextToken(); // System.out.println("==" + t); KeywordNode keywordNode = new KeywordNode(t.getValue()); Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List optionList = new OptionTokenizer((String) ot.getValue()).tokenize(); keywordNode.setOptions(optionList); advanceTokenPointer(); } return keywordNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also " + MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also "+MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also "+MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
@SuppressWarnings("unchecked") FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also "+MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = ot.getOptionsList(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also "+MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also " + MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }
FormattingNode COMPOSITE(String keyword) throws ScanException { CompositeNode compositeNode = new CompositeNode(keyword); Node childNode = E(); compositeNode.setChildNode(childNode); Token t = getNextToken(); if (t == null || t.getType() != Token.RIGHT_PARENTHESIS) { String msg = "Expecting RIGHT_PARENTHESIS token but got " + t; addError(msg); addError("See also " + MISSING_RIGHT_PARENTHESIS); throw new ScanException(msg); } Token ot = getCurentToken(); if (ot != null && ot.getType() == Token.OPTION) { List<String> optionList = (List<String>) ot.getValue(); compositeNode.setOptions(optionList); advanceTokenPointer(); } return compositeNode; }