Class DlgpeParser
java.lang.Object
fr.inria.rules.integraal.io.dlgpe2.DlgpeParser
Parses DLGPE content into sentence objects using an Integraal environment.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a parser bound to an Integraal environment. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDemonstrates parsing and serializing a DLGPE document.Iterator<fr.inria.rules.dlgpemodel.api.sentences.ISentence> Parses a sequence of DLGPE items from a string.Iterator<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parse(org.antlr.v4.runtime.CharStream input) Parses a sequence of DLGPE items from a character stream.List<fr.inria.rules.dlgpemodel.api.sentences.ISentence> Parses a full DLGPE document from a string.List<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parseAll(org.antlr.v4.runtime.CharStream input) Parses a full DLGPE document from a character stream.
-
Constructor Details
-
DlgpeParser
Creates a parser bound to an Integraal environment.- Parameters:
env- the environment providing the parser dependencies
-
-
Method Details
-
parseAll
-
parseAll
public List<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parseAll(org.antlr.v4.runtime.CharStream input) throws NoSuchMethodException Parses a full DLGPE document from a character stream.- Parameters:
input- the input stream- Returns:
- the parsed sentences
- Throws:
NoSuchMethodException- if the configured parse rule cannot be resolved
-
parse
-
parse
public Iterator<fr.inria.rules.dlgpemodel.api.sentences.ISentence> parse(org.antlr.v4.runtime.CharStream input) throws Exception Parses a sequence of DLGPE items from a character stream.- Parameters:
input- the input stream- Returns:
- an iterator over parsed sentences
- Throws:
Exception- if parsing fails
-
main
-