| Index: tools/lexer_generator/code_generator.py
|
| diff --git a/tools/lexer_generator/code_generator.py b/tools/lexer_generator/code_generator.py
|
| index 34f6f5ffa733fb179814b8dd71ae77b7c9a24021..4c6b033540b8425a50c56697c6ccaffb0a10a866 100644
|
| --- a/tools/lexer_generator/code_generator.py
|
| +++ b/tools/lexer_generator/code_generator.py
|
| @@ -27,6 +27,8 @@
|
|
|
| from dfa import Dfa
|
| import jinja2
|
| +import os
|
| +import sys
|
|
|
| class CodeGenerator:
|
|
|
| @@ -50,6 +52,7 @@ class CodeGenerator:
|
| assert(default_action and default_action.match_action())
|
| default_action = default_action.match_action()
|
|
|
| + sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
| template_env = jinja2.Environment(
|
| loader = jinja2.PackageLoader('lexer_generator', '.'),
|
| undefined = jinja2.StrictUndefined)
|
|
|