Browse Source

A tiny fix

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.10.0
Erez Sh 4 years ago
parent
commit
c6438007a7
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      docs/classes.rst
  2. +2
    -2
      lark/exceptions.py

+ 2
- 0
docs/classes.rst View File

@@ -58,6 +58,8 @@ UnexpectedInput

.. autoclass:: lark.exceptions.UnexpectedCharacters

.. _parserpuppet:

ParserPuppet
------------



+ 2
- 2
lark/exceptions.py View File

@@ -65,7 +65,7 @@ class UnexpectedInput(LarkError):
iterate the dictionary until it finds a matching error, and
return the corresponding value.

For an example usage, see examples/error_reporting_lalr.py
For an example usage, see `examples/error_reporting_lalr.py`

Parameters:
parse_fn: parse function (usually ``lark_instance.parse``)
@@ -141,7 +141,7 @@ class UnexpectedToken(ParseError, UnexpectedInput):
with its internal state. Users can then interactively set the puppet to
the desired puppet state, and resume regular parsing.

see: ``ParserPuppet``.
see: :ref:`ParserPuppet`.
"""
def __init__(self, token, expected, considered_rules=None, state=None, puppet=None):
self.line = getattr(token, 'line', '?')


Loading…
Cancel
Save