Esempio n. 1
0
        void StartInside()
        {
            cur_inside = new InsideInfo();
            insides.Add(cur_inside);

            cur_nlc = cur_inside.Context;
        }
Esempio n. 2
0
	internal WrenchProvider (GraphBuilder gb, string basis, short id) 
	    : base (gb, basis) 
	{
	    namecontext = new NameLookupContext ();

	    this.id = id;
	}
Esempio n. 3
0
        internal WrenchProvider(GraphBuilder gb, string basis, short id)
            : base(gb, basis)
        {
            namecontext = new NameLookupContext();

            this.id = id;
        }
Esempio n. 4
0
        public BuildfileParser(StreamReader reader, string topsrc, string resource_subdir,
                               string location_base, WrenchProvider wp, IWarningLogger log)
        {
            lexer = new BuildfileTokenizer(reader);

            this.topsrc          = topsrc;
            this.resource_subdir = resource_subdir;
            this.location_base   = location_base;
            this.wp  = wp;
            this.log = log;

            cur_nlc = wp.NameContext;
        }
Esempio n. 5
0
	public BuildfileParser (StreamReader reader, string topsrc, string resource_subdir, 
				string location_base, WrenchProvider wp, IWarningLogger log)
	{
	    lexer = new BuildfileTokenizer (reader);

	    this.topsrc = topsrc;
	    this.resource_subdir = resource_subdir;
	    this.location_base = location_base;
	    this.wp = wp;
	    this.log = log;

	    cur_nlc = wp.NameContext;
	}
Esempio n. 6
0
        // blah

        public object Clone()
        {
            if (this.bm != null)
            {
                throw new InvalidOperationException();
            }

            NameLookupContext clone = new NameLookupContext();

            clone.nsqueue       = new Dictionary <string, string> (nsqueue);
            clone.known_structs = new Dictionary <Type, StructureTemplate> (known_structs);
            clone.namespaces    = new List <string> (namespaces);
            return(clone);
        }
Esempio n. 7
0
        internal bool DoFixup(NameLookupContext nlc, IWarningLogger log)
        {
            log.PushLocation(FullName);

            try {
                if (ResolveTemplate(nlc, log))
                {
                    return(true);
                }

                ApplyWaitTags();

                // Now register our tags with the GraphBuilder

                GraphBuilder gb = (GraphBuilder)Owner.Owner;

                foreach (string tag in TagsWithValues)
                {
                    if (gb.GetTagId(tag) < 0)
                    {
                        return(true);
                    }
                }

                // Now make sure that all of our argument names are valid.

                Rule rinst = (Rule)Activator.CreateInstance(Rule);
                Dictionary <string, int> argmap = rinst.MakeArgNameMap();

                foreach (string arg in ArgsWithDeps)
                {
                    if (argmap.ContainsKey(arg))
                    {
                        continue;
                    }

                    string s = String.Format("Argument `{0}' does not exist in rule " +
                                             "`{1}'", arg, Rule);
                    log.Error(2024, s, null);
                    return(true);
                }
            } finally {
                log.PopLocation();
            }

            return(false);
        }
Esempio n. 8
0
	public InsideProviderLoader (string basis, NameLookupContext tmpl)
	    : base (basis, null)
	{
	    this.nlc = (NameLookupContext) tmpl.Clone ();
	}
Esempio n. 9
0
 public InsideProviderLoader(string basis, NameLookupContext tmpl)
     : base(basis, null)
 {
     this.nlc = (NameLookupContext)tmpl.Clone();
 }
Esempio n. 10
0
	// blah
	
	public object Clone () 
	{
	    if (this.bm != null)
		throw new InvalidOperationException ();
	    
	    NameLookupContext clone = new NameLookupContext ();
	    clone.nsqueue = new Dictionary<string,string> (nsqueue);
	    clone.known_structs = new Dictionary<Type,StructureTemplate> (known_structs);
	    clone.namespaces = new List<string> (namespaces);
	    return clone;
	}
Esempio n. 11
0
 void FinishInside()
 {
     cur_nlc = wp.NameContext;
 }
Esempio n. 12
0
 public InsideInfo()
 {
     nlc   = new NameLookupContext();
     bases = new List <string> ();
 }
Esempio n. 13
0
	internal bool DoFixup (NameLookupContext nlc, IWarningLogger log) 
	{
	    log.PushLocation (FullName);

	    try {
		if (ResolveTemplate (nlc, log))
		    return true;

		ApplyWaitTags ();

		// Now register our tags with the GraphBuilder

		GraphBuilder gb = (GraphBuilder) Owner.Owner;

		foreach (string tag in TagsWithValues) {
		    if (gb.GetTagId (tag) < 0)
			return true;
		}
		
		// Now make sure that all of our argument names are valid.
		
		Rule rinst = (Rule) Activator.CreateInstance (Rule);
		Dictionary<string,int> argmap = rinst.MakeArgNameMap ();
		
		foreach (string arg in ArgsWithDeps) {
		    if (argmap.ContainsKey (arg))
			continue;
			
		    string s = String.Format ("Argument `{0}' does not exist in rule " +
					      "`{1}'", arg, Rule);
		    log.Error (2024, s, null);
		    return true;
		}
	    } finally {
		log.PopLocation ();
	    }

	    return false;
	}
Esempio n. 14
0
	void FinishInside ()
	{
	    cur_nlc = wp.NameContext;
	}
Esempio n. 15
0
	void StartInside ()
	{
	    cur_inside = new InsideInfo ();
	    insides.Add (cur_inside);

	    cur_nlc = cur_inside.Context;
	}
Esempio n. 16
0
	    public InsideInfo ()
	    {
		nlc = new NameLookupContext ();
		bases = new List<string> ();
	    }