Record Class EarleyParser.Expected
java.lang.Object
java.lang.Record
org.libxmq.imp.ixml.earley.EarleyParser.Expected
- Record Components:
rule- the named rule, for a generated rule the named rule it was made for, null for the end of the inputtext- the characters, or the character set, as written in the grammar, eg 'gives', #20 or ['a'-'z'; #a], or "end of input"chars- the terminal that comes first, null for the end of the input
- Enclosing class:
EarleyParser
public static record EarleyParser.Expected(String rule, String text, Grammar.Chars chars)
extends Record
What may come next at a position, in a grammar rule.
ixml has no tokens, a string like 'gives' is read one character at a time.
So the characters from the dot of the item up to the next character set or
rule are given together, eg 'gives', or 'ves' when 'gi' has been read.
-
Constructor Summary
ConstructorsConstructorDescriptionExpected(String rule, String text, Grammar.Chars chars) Creates an instance of aExpectedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchars()Returns the value of thecharsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.rule()Returns the value of therulerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Expected
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
rule
-
text
-
chars
-