Antlr3.AntlrTool.GetLibraryFile C# (CSharp) Method

GetLibraryFile() public method

public GetLibraryFile ( string fileName ) : string
fileName string
return string
        public virtual string GetLibraryFile( string fileName )
        {
            // First, see if we can find the file in the library directory
            //
            string f = Path.Combine( LibraryDirectory, fileName );

            if ( File.Exists( f ) )
            {
                // Found in the library directory
                //
                return Path.GetFullPath( f );
            }

            // Need to assume it is in the same location as the input file. Note that
            // this is only relevant for external build tools and when the input grammar
            // was specified relative to the source directory (working directory if using
            // the command line.
            //
            return Path.Combine( parentGrammarDirectory, fileName );
        }