@ParseMethod(start="bnf", wideIndex=true) public abstract void parse(String txt); @Rule(left="rules", value={"rules", "OR", "symbol_list"})
if (pm.lower()) if (pm.upper()) if (pm.wideIndex()) if (pm.syntaxOnly()) if (pm.useOffsetLocatorException()) for (ParserFeature pf : pm.features())
/** * Return a parser generator from grammar. The same grammar can produce different * parsers depending for example on start rhs. * @return */ public LALRKParserGenerator getParserGenerator(ParseMethod parseMethod) { Grammar g = new Grammar(parseMethod.start(), this, parseMethod.eof(), parseMethod.whiteSpace()); try { return g.createParserGenerator(parseMethod.start(), ParserFeature.get(parseMethod)); } catch (Throwable t) { throw new GrammarException("problem with "+parseMethod, t); } } public LALRKParserGenerator createParserGenerator(String start, EnumSet<ParserFeature> features) throws IOException
@ParseMethod(start="Goal") public abstract long parse(String txt); @Terminal(left="NUMBER", expression="[0-9]+")
@ParseMethod(start="expression", features={SingleThread}) @Override public abstract String parse(String text);
@ParseMethod(start="S") public abstract void parse(String text);
@ParseMethod(start="block") public abstract void parse(String txt);
@ParseMethod(start="bnf", whiteSpace={"s"}) @Override public void parseBnf( CharSequence text, @ParserContext("GRAMMAR") Grammar g ) { throw new UnsupportedOperationException(); }
@ParseMethod(start = "10Messages", size = 1024, wideIndex = true) protected abstract void parse10Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "11Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "20Messages", size = 1024, wideIndex = true) protected abstract void parse20Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "21Messages", size = 1024, wideIndex = true)
/** * * @param text * @param calendar * @throws IOException * @see <a href="doc-files/InternetDateParser-date.html#BNF">BNF Syntax for RFC1123 or RFC850 or AscTime or ISO8601 date</a> */ @ParseMethod(start = "date", wideIndex = true) protected abstract void parse(String text, @ParserContext Calendar calendar) throws IOException; /**
/** * * @param text * @return * @see <a href="doc-files/DSQLParser-coordinate.html#BNF">BNF Syntax for Geological Coordinate</a> */ @ParseMethod(start="coordinate", whiteSpace ="whiteSpace") public abstract GeoPt parseCoordinate(String text, @ParserContext("locator") SQLLocator locator) throws OffsetLocatorException;
@ParseMethod(start = "11Messages", size = 1024, wideIndex = true) protected abstract void parse11Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "12Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "18Messages", size = 1024, wideIndex = true) protected abstract void parse18Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "19Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "21Messages", size = 1024, wideIndex = true) protected abstract void parse21Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "22Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "12Messages", size = 1024, wideIndex = true) protected abstract void parse12Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "14Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "16Messages", size = 1024, wideIndex = true) protected abstract void parse16Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "17Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "22Messages", size = 1024, wideIndex = true) protected abstract void parse22Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "23Messages", size = 1024, wideIndex = true)
@ParseMethod(start = "27Messages", size = 1024, wideIndex = true) protected abstract void parse27Messages( InputStream is, @ParserContext("aisData") AISObserver aisData); @ParseMethod(start = "4Messages", size = 1024, wideIndex = true)