private Symbol parse(ParseSpecification newSpecification) { return new Parser(this, currentPage, scanner, newSpecification).parse(); }
public Symbol parseToEnds(int priority, SymbolProvider provider, SymbolType[] moreEnds) { ParseSpecification newSpecification = specification.makeSpecification(provider, moreEnds).priority(priority); for (SymbolType end: moreEnds) newSpecification.end(end); return parse(newSpecification); }
public Symbol parseToEnds(int priority, SymbolProvider provider, SymbolType[] moreEnds) { ParseSpecification newSpecification = specification.makeSpecification(provider, moreEnds).priority(priority); for (SymbolType end: moreEnds) newSpecification.end(end); return parse(newSpecification); }
public Symbol parseToEnd(SymbolType end) { return parse(new ParseSpecification().provider(specification).end(end)); }
public Symbol parseToEnd(SymbolType end) { return parse(new ParseSpecification().provider(specification).end(end)); }
public Symbol parseTo(SymbolType terminator, int priority) { return parse(new ParseSpecification() /*.provider(specification)*/ .terminator(terminator).priority(priority)); }
public Symbol parseToIgnoreFirst(SymbolType[] types) { ParseSpecification newSpecification = new ParseSpecification().provider(specification); for (SymbolType symbolType: types) { newSpecification.terminator(symbolType); newSpecification.ignoreFirst(symbolType); } return parse(newSpecification); }
public Symbol parseToWithSymbols(SymbolType[] terminators, SymbolProvider provider, int priority) { ParseSpecification newSpecification = new ParseSpecification().provider(provider).priority(priority); for (SymbolType terminator: terminators) newSpecification.terminator(terminator); return parse(newSpecification); }
private void parse() { if (syntaxTree == null) { // This is the only page where we need a VariableSource parsingPage = makeParsingPage(this); syntaxTree = Parser.make(parsingPage, getData().getContent()).parse(); } }
public Symbol parseToWithSymbols(SymbolType[] terminators, SymbolProvider provider, int priority) { ParseSpecification newSpecification = new ParseSpecification().provider(provider).priority(priority); for (SymbolType terminator: terminators) newSpecification.terminator(terminator); return parse(newSpecification); }
public Symbol parseToIgnoreFirst(SymbolType[] types) { ParseSpecification newSpecification = new ParseSpecification().provider(specification); for (SymbolType symbolType: types) { newSpecification.terminator(symbolType); newSpecification.ignoreFirst(symbolType); } return parse(newSpecification); }
private void parse() { if (syntaxTree == null) { // This is the only page where we need a VariableSource parsingPage = makeParsingPage(this); syntaxTree = Parser.make(parsingPage, getData().getContent()).parse(); } }
public Symbol parseToIgnoreFirstWithSymbols(SymbolType ignore, SymbolProvider provider) { return parse(new ParseSpecification().ignoreFirst(ignore).terminator(ignore).provider(provider)); }
String getHtmlFor(String input) { SourcePage page = new DummySourcePage(); Symbol list = Parser.make(new ParsingPage(page), input).parse(); return new HtmlTranslator(page, new ParsingPage(page)).translateTree(list); }
String getHtmlFor(String input) { SourcePage page = new DummySourcePage(); Symbol list = Parser.make(new ParsingPage(page), input).parse(); return new HtmlTranslator(page, new ParsingPage(page)).translateTree(list); }
@Override public void process(WikiPage currentPage) { this.currentPage = currentPage; String content = currentPage.getData().getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); syntaxTree.walkPreOrder(this); }
@Override public void process(WikiPage currentPage) { this.currentPage = currentPage; String content = currentPage.getData().getContent(); Symbol syntaxTree = Parser.make( new ParsingPage(new WikiSourcePage(currentPage)), content, SymbolProvider.refactoringProvider) .parse(); syntaxTree.walkPreOrder(this); }
@Override public String getHtml() { // -AJM- Okay, this is not as clean as I'd like it to be, but for now it does the trick if (containsWikitext()) { String content = getDecoratedContent(); ParsingPage parsingPage = BaseWikitextPage.makeParsingPage((BaseWikitextPage) sourcePage); Symbol syntaxTree = Parser.make(parsingPage, content).parse(); return new HtmlTranslator(new WikiSourcePage(sourcePage), parsingPage).translateTree(syntaxTree); } else { return sourcePage.getHtml(); } }
@Override public String getHtml() { // -AJM- Okay, this is not as clean as I'd like it to be, but for now it does the trick if (containsWikitext()) { String content = getDecoratedContent(); ParsingPage parsingPage = BaseWikitextPage.makeParsingPage((BaseWikitextPage) sourcePage); Symbol syntaxTree = Parser.make(parsingPage, content).parse(); return new HtmlTranslator(new WikiSourcePage(sourcePage), parsingPage).translateTree(syntaxTree); } else { return sourcePage.getHtml(); } }
public Symbol parseWithParent(String input, Parser parent) { return new Parser(parent, currentPage, new Scanner(new TextMaker(currentPage, currentPage.getNamedPage()), input), new ParseSpecification().provider(specification)).parse(); }