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 classPegWordRule.ModeMode 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 StringgetExpression()PegResult<String>parse(String text, int start)Parser produces an object
-
-
-
Method Detail
-
getExpression
public String getExpression()
- Specified by:
getExpressionin 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:
parsein 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.
-
-