Package io.vertigo.commons.peg.rule
Interface PegRule<R>
- Type Parameters:
R- Type of the product text parsing
- All Known Implementing Classes:
PegAbstractRule
public interface PegRule<R>
Rule used in PEG. parsing expression grammar.
- Author:
- pchretien
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classDummy class, used for rule that returns Void. -
Method Summary
-
Method Details
-
getExpression
String getExpression()- Returns:
- Expression de la règle.
-
parse
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.
- 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.
-
parse
- Throws:
PegNoMatchFoundException
-