In semantic_context.dart, there is an import statement for atn_simulator.dart.
|
import 'package:antlr4/src/atn/src/atn_simulator.dart'; |
It should not import 'package:antlr4'. In all other source files in the Dart runtime, the import statement for a file within the Dart Antlr4 runtime is a relative path name, e.g., import '../../interval_set.dart';. Not only is an import from package:antlr4 inconsistent, it causes a cargo compile to fail when the source for the runtime is copied to the driver program. I want to test modifications of the Dart runtime with my driver. I can't do that because of the one import 'package:antlr4 ... statement.
The correct way to reference other files in the runtime is to use a relative path name, i.e., import 'atn_simulator.dart'; for this one file. If I do that, the code compiles fine.