Package net.mindengine.galen.parser

Examples of net.mindengine.galen.parser.ExpectWord


    @Override
    public Spec processSpec(String specName, String paramsText, String contextPath) throws IOException {
       
        StringCharReader reader = new StringCharReader(paramsText);
        String objectName = new ExpectWord().read(reader);
       
        if (objectName.isEmpty()) {
            throw new SyntaxException("Missing object name");
        }
       
View Full Code Here


            }
        }
    }

    private String expectCorrectionsOrId(StringCharReader reader, String objectName) {
        String word = new ExpectWord().stopOnTheseSymbols('(').read(reader).trim();
        if (word.isEmpty()) {
            throw new SyntaxException(UNKNOWN_LINE, format("Missing locator for object \"%s\"", objectName));
        }
        return word;
    }
View Full Code Here

        }
        return word;
    }

    private String expectWord(StringCharReader reader, String errorMessage) {
        String word = new ExpectWord().read(reader).trim();
        if (word.isEmpty()) {
            throw new SyntaxException(UNKNOWN_LINE, errorMessage);
        }
        return word;
    }
View Full Code Here

    private void doSpecialInstruction(String line) throws IOException, NoSuchAlgorithmException {
    line = line.trim().substring(2).trim();
   
    StringCharReader reader = new StringCharReader(line);
   
    String firstWord = new ExpectWord().read(reader);
   
    if (firstWord.toLowerCase().equals("import")) {
      importFile(reader.getTheRest().trim());
    }
    else if (firstWord.toLowerCase().equals("set")) {
View Full Code Here

        }
    }
 
    public void readAndSetVariableFromText(String text) {
        StringCharReader reader = new StringCharReader(text);
        String varName = new ExpectWord().read(reader);
       
        String varValue = reader.getTheRest().trim();
       
        properties.setProperty(varName, varValue);
    }
View Full Code Here

TOP

Related Classes of net.mindengine.galen.parser.ExpectWord

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.