Package io.vertigo.commons.peg
Class PegWordRule
- java.lang.Object
-
- io.vertigo.commons.peg.PegWordRule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PegWordRule.Mode
Mode de selection des caractères.-
Nested classes/interfaces inherited from interface io.vertigo.commons.peg.PegRule
PegRule.Dummy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExpression()
PegResult<String>
parse(String text, int start)
Parser produces an object
-
-
-
Method Detail
-
getExpression
public String getExpression()
- Specified by:
getExpression
in interfacePegRule<String>
- Returns:
- Expression de la règle.
-
parse
public PegResult<String> parse(String text, int start) throws PegNoMatchFoundException
Parser produces an objector throw an exception. A parser analyzes a text, according some rules. A parser is responsible for moving the index position or throw an exception. Returns the result of the parsing operation.
- Specified by:
parse
in interfacePegRule<String>
- Parameters:
text
- Text to parsestart
- Start of the element of text to parse- Returns:
- the new index and the result
- Throws:
PegNoMatchFoundException
- if parsing has failed.
-
-