private boolean verifyEvent(String content, TextEvent event) { Parser parser = new Parser(fRules, fStartSymbol); StringBuffer tryContent = new StringBuffer(content); tryContent.replace(event.getBegin(), event.getEnd(), event.getText()); fScanner.setStringToScann(tryContent.toString()); if (parser.parser(fScanner)) { return true; } else { return false; } }
public ExpressionTemplate(Template template) { super(template, template.getModel().getMetaElement("Expression")); fScanner = new Scanner(Scanner.getTokensFromRules(fRules)); }