public class ShallowParsingTestUtils extends java.lang.Object
| Constructor and Description |
|---|
ShallowParsingTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
normalizeParseResult(java.util.List<ShallowEntity> entities)
Normalizes the parsed result.
|
static java.util.List<ShallowEntity> |
parseAllFragments(java.lang.String input,
ELanguage language)
* Returns the shallow entities of the parsed input using *
IShallowParser.parseFragment(List). |
static java.util.List<ShallowEntity> |
parseAllTopLevel(java.lang.String input,
ELanguage language)
Returns all shallow entities of the parsed input using
IShallowParser.parseTopLevel(List). |
static java.util.List<ShallowEntity> |
parseEntities(java.lang.String code,
boolean isFragment,
ELanguage language)
Parses the code either as fragment or top-level.
|
static ShallowEntity |
parseFragment(java.lang.String input,
ELanguage language)
Returns the first shallow entity of the parsed input using
IShallowParser.parseFragment(List). |
static ShallowEntity |
parseFragmentAtIndex(java.lang.String input,
ELanguage language,
int index)
Returns the shallow entities of the parsed input using
IShallowParser.parseFragment(List). |
static ShallowEntity |
parseTopLevel(java.lang.String input,
ELanguage language)
Returns the first shallow entity of the parsed input using
IShallowParser.parseTopLevel(List). |
static java.lang.String |
printIncludedTokensHierarchy(java.util.List<ShallowEntity> entities)
Prints the token texts of the given shallow entities.
|
public ShallowParsingTestUtils()
public static java.util.List<ShallowEntity> parseAllTopLevel(java.lang.String input, ELanguage language) throws ShallowParserException
IShallowParser.parseTopLevel(List).ShallowParserExceptionpublic static ShallowEntity parseTopLevel(java.lang.String input, ELanguage language) throws ShallowParserException
IShallowParser.parseTopLevel(List).ShallowParserExceptionpublic static java.util.List<ShallowEntity> parseAllFragments(java.lang.String input, ELanguage language) throws ShallowParserException
IShallowParser.parseFragment(List).ShallowParserExceptionpublic static ShallowEntity parseFragment(java.lang.String input, ELanguage language) throws ShallowParserException
IShallowParser.parseFragment(List).ShallowParserExceptionpublic static ShallowEntity parseFragmentAtIndex(java.lang.String input, ELanguage language, int index) throws ShallowParserException
IShallowParser.parseFragment(List).ShallowParserExceptionpublic static java.util.List<ShallowEntity> parseEntities(java.lang.String code, boolean isFragment, ELanguage language) throws ShallowParserException
ShallowParserExceptionpublic static java.lang.String normalizeParseResult(java.util.List<ShallowEntity> entities)
public static java.lang.String printIncludedTokensHierarchy(java.util.List<ShallowEntity> entities)