class documentation
A linear logic expression parser.
| Method | __init__ |
to their types. |
| Method | attempt_ |
Attempt to make an application expression. If the next tokens are an argument in parens, then the argument expression is a function being applied to the arguments. Otherwise, return the argument expression. |
| Method | get |
This method exists to be overridden |
| Method | get_ |
This method serves as a hook for other logic parsers that have different boolean operators |
| Method | handle |
This method is intended to be overridden for logics that use different operators or expressions |
| Method | make_ |
Undocumented |
| Method | make_ |
Undocumented |
| Instance Variable | operator |
Undocumented |
Inherited from LogicParser:
| Method | __repr__ |
Undocumented |
| Method | assert |
Undocumented |
| Method | assert |
Undocumented |
| Method | attempt |
Undocumented |
| Method | attempt_ |
Attempt to make a boolean expression. If the next token is a boolean operator, then a BooleanExpression will be returned. Otherwise, the parameter will be returned. |
| Method | attempt_ |
Attempt to make an equality expression. If the next token is an equality operator, then an EqualityExpression will be returned. Otherwise, the parameter will be returned. |
| Method | get |
Undocumented |
| Method | get_ |
This method serves as a hook for other logic parsers that have different quantifiers |
| Method | handle |
Undocumented |
| Method | handle |
Undocumented |
| Method | handle |
Undocumented |
| Method | handle |
Undocumented |
| Method | handle |
Undocumented |
| Method | has |
Undocumented |
| Method | in |
Return TRUE if the given location is within the buffer |
| Method | isvariable |
Undocumented |
| Method | make_ |
Undocumented |
| Method | make_ |
This method serves as a hook for other logic parsers that have different equality expression classes |
| Method | make_ |
Undocumented |
| Method | make_ |
Undocumented |
| Method | make_ |
Undocumented |
| Method | parse |
Parse the expression. |
| Method | process |
Split the data into tokens |
| Method | process |
Parse the next complete expression from the stream and return it. |
| Method | process |
Undocumented |
| Method | token |
Get the next waiting token. If a location is given, then return the token at currentIndex+location without advancing currentIndex; setting it gives lookahead/lookback capability. |
| Instance Variable | quote |
Undocumented |
| Instance Variable | right |
Undocumented |
| Instance Variable | type |
A list of tuples of quote characters. The 4-tuple is comprised of the start character, the end character, the escape character, and a boolean indicating whether the quotes should be included in the result... |
| Instance Variable | _buffer |
Undocumented |
| Instance Variable | _current |
Undocumented |
overrides
nltk.sem.logic.LogicParser.__init__to their types.
| Parameters | |
| type | bool should type checking be performed? |
Attempt to make an application expression. If the next tokens are an argument in parens, then the argument expression is a function being applied to the arguments. Otherwise, return the argument expression.
overrides
nltk.sem.logic.LogicParser.handleThis method is intended to be overridden for logics that use different operators or expressions