public VHDL_LibraryCompiler(VHDL_Library_Manager libraryManager, List <string> LibraryPath, string LibraryConfigurationPath)
 {
     this.LibraryPath = LibraryPath;
     this.LibraryConfigurationPath = LibraryConfigurationPath;
     this.libraryManager           = libraryManager;
     logger = libraryManager.Logger;
 }
Esempio n. 2
0
 public static VhdlFile parseString(string str, VHDL_Library_Manager libraryManager)
 {
     return(parseString(str, DEFAULT_SETTINGS, libraryManager));
 }
Esempio n. 3
0
 public static VhdlFile parseFile(string fileName, VhdlParserSettings settings, RootDeclarativeRegion rootScope, LibraryDeclarativeRegion libray, VHDL_Library_Manager libraryManager)
 {
     return(parse(settings, new CaseInsensitiveFileStream(fileName), rootScope, libray, libraryManager));
 }
Esempio n. 4
0
 public static VhdlFile parseFile(string fileName, VhdlParserSettings settings, VHDL_Library_Manager libraryManager)
 {
     return(parse(settings, new CaseInsensitiveFileStream(fileName), libraryManager));
 }
Esempio n. 5
0
 public static VhdlFile parseFile(string fileName, VHDL_Library_Manager libraryManager)
 {
     return(parseFile(fileName, DEFAULT_SETTINGS, libraryManager));
 }
Esempio n. 6
0
        private static VhdlFile parse(VhdlParserSettings settings, ICharStream stream, VHDL_Library_Manager libraryManager)
        {
            RootDeclarativeRegion    rootScope    = new RootDeclarativeRegion();
            LibraryDeclarativeRegion libraryScope = new LibraryDeclarativeRegion("work");

            rootScope.Libraries.Add(libraryScope);

            return(parse(settings, stream, rootScope, libraryScope, libraryManager));
        }
Esempio n. 7
0
        private static VhdlFile parse(VhdlParserSettings settings, ICharStream stream, RootDeclarativeRegion rootScope, LibraryDeclarativeRegion libraryScope, VHDL_Library_Manager libraryManager)
        {
            vhdlLexer lexer = new vhdlLexer(stream);

            CommonTokenStream tokens = new CommonTokenStream(lexer);
            vhdlParser        parser = new vhdlParser(tokens);

            //--------------------------------------------
            //Optional - add listener
            //vhdlListener listener = new vhdlListener();
            //parser.AddParseListener(listener);
            //--------------------------------------------
            vhdlSemanticErrorListener vhdlSemanticErrorListener = new vhdlSemanticErrorListener(stream.SourceName);

            parser.AddErrorListener(vhdlSemanticErrorListener);

            IParseTree tree = parser.design_file();
            //Console.WriteLine(tree.ToStringTree(parser));
            vhdlVisitor visitor = new vhdlVisitor(settings, rootScope, libraryScope, libraryManager)
            {
                FileName = stream.SourceName
            };
            VhdlFile res = visitor.Visit(tree) as VhdlFile;

            return(res);
        }
Esempio n. 8
0
 public static VhdlFile parseStream(Stream stream, VhdlParserSettings settings, VHDL_Library_Manager libraryManager)
 {
     return(parse(settings, new CaseInsensitiveInputStream(stream), libraryManager));
 }
Esempio n. 9
0
 public static VhdlFile parseStream(Stream stream, VHDL_Library_Manager libraryManager)
 {
     return(parseStream(stream, DEFAULT_SETTINGS, libraryManager));
 }