|
@@ -40,11 +40,11 @@ class ParserError(Exception): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from .builder import Builder |
|
|
from .builder import Builder |
|
|
from .tokenizer import Tokenizer |
|
|
|
|
|
try: |
|
|
try: |
|
|
from ._tokenizer import CTokenizer |
|
|
from ._tokenizer import CTokenizer |
|
|
use_c = True |
|
|
use_c = True |
|
|
except ImportError: |
|
|
except ImportError: |
|
|
|
|
|
from .tokenizer import Tokenizer |
|
|
CTokenizer = None |
|
|
CTokenizer = None |
|
|
use_c = False |
|
|
use_c = False |
|
|
|
|
|
|
|
@@ -70,6 +70,7 @@ class Parser(object): |
|
|
if use_c and CTokenizer: |
|
|
if use_c and CTokenizer: |
|
|
self._tokenizer = CTokenizer() |
|
|
self._tokenizer = CTokenizer() |
|
|
else: |
|
|
else: |
|
|
|
|
|
from .tokenizer import Tokenizer |
|
|
self._tokenizer = Tokenizer() |
|
|
self._tokenizer = Tokenizer() |
|
|
self._builder = Builder() |
|
|
self._builder = Builder() |
|
|
|
|
|
|
|
|