Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VIGNET Pierre
cadbiom
Commits
4dff9821
Commit
4dff9821
authored
Dec 03, 2016
by
VIGNET Pierre
Browse files
Forgotten imports
parent
3bac9c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
cadbiom/antlr3/exceptions.py
View file @
4dff9821
...
...
@@ -113,8 +113,8 @@ class RecognitionException(Exception):
self
.
index
=
input
.
index
()
# late import to avoid cyclic dependencies
from
antlr3.streams
import
TokenStream
,
CharStream
from
antlr3.tree
import
TreeNodeStream
from
cadbiom.
antlr3.streams
import
TokenStream
,
CharStream
from
cadbiom.
antlr3.tree
import
TreeNodeStream
if
isinstance
(
self
.
input
,
TokenStream
):
self
.
token
=
self
.
input
.
LT
(
1
)
...
...
@@ -134,8 +134,8 @@ class RecognitionException(Exception):
self
.
c
=
self
.
input
.
LA
(
1
)
def
extractInformationFromTreeNodeStream
(
self
,
nodes
):
from
antlr3.tree
import
Tree
,
CommonTree
from
antlr3.tokens
import
CommonToken
from
cadbiom.
antlr3.tree
import
Tree
,
CommonTree
from
cadbiom.
antlr3.tokens
import
CommonToken
self
.
node
=
nodes
.
LT
(
1
)
adaptor
=
nodes
.
adaptor
...
...
@@ -177,8 +177,8 @@ class RecognitionException(Exception):
def
getUnexpectedType
(
self
):
"""Return the token type or char of the unexpected input element"""
from
antlr3.streams
import
TokenStream
from
antlr3.tree
import
TreeNodeStream
from
cadbiom.
antlr3.streams
import
TokenStream
from
cadbiom.
antlr3.tree
import
TreeNodeStream
if
isinstance
(
self
.
input
,
TokenStream
):
return
self
.
token
.
type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment