Package snap.parse
Class ParseHandler<T>
java.lang.Object
snap.parse.ParseHandler<T>
- Direct Known Subclasses:
JSParser.ArrayHandler
,JSParser.ObjectHandler
,JSParser.PairHandler
,JSParser.ValueHandler
,KeyChainParser.ArgListHandler
,KeyChainParser.BinaryExprHandler
,KeyChainParser.ExpressionHandler
,KeyChainParser.KeyChainHandler
,KeyChainParser.ObjectHandler
,KeyChainParser.StatementHandler
,KeyChainParser.UnaryExprHandler
,ParseRuleParser.AndExprHandler
,ParseRuleParser.CountExprHandler
,ParseRuleParser.ExpressionHandler
,ParseRuleParser.OrExprHandler
,ParseRuleParser.ParseRuleFileHandler
,ParseRuleParser.ParseRuleHandler
,XMLParser.AttributeHandler
,XMLParser.DocumentHandler
,XMLParser.ElementHandler
,XMLParser.PrologHandler
A class called when child rules are parsed.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ParseHandler<T>
Returns a backup handler.protected T
Creates the part.void
fail()
Indicates that parsing should fail on current rule.Returns a handler that is not in use.protected ParseHandler<T>
Returns a backup handler.getPart()
Returns the part.Returns the part class.Returns the token where the current part started.boolean
isFail()
Whether parsing should fail on current rule.Called when all child rules have been successfully parsed.protected void
Called when a child rule has been successfully parsed into given node.protected void
Called when a child rule has been successfully parsed into given node.void
reset()
Resets the handler.
-
Field Details
-
_part
-
_backupHandler
-
-
Constructor Details
-
ParseHandler
public ParseHandler()
-
-
Method Details
-
parsedOne
Called when a child rule has been successfully parsed into given node. -
parsedOne
Called when a child rule has been successfully parsed into given node. -
parsedAll
Called when all child rules have been successfully parsed. -
getPart
Returns the part. -
createPart
Creates the part. -
getPartClass
Returns the part class. -
getStartToken
Returns the token where the current part started. -
isFail
public boolean isFail()Whether parsing should fail on current rule. -
fail
public void fail()Indicates that parsing should fail on current rule. -
getAvailableHandler
Returns a handler that is not in use. This method should be synchronized, but that makes TeaVM unhappy. -
getBackupHandler
Returns a backup handler. -
createBackupHandler
Returns a backup handler. -
reset
public void reset()Resets the handler.
-