public void write_program_tree(program_tree _program_tree)
		{
			write_syntax_tree_node(_program_tree);
			if (_program_tree.compilation_units == null)
			{
				bw.Write((byte)0);
			}
			else
			{
				bw.Write((byte)1);
				bw.Write(_program_tree.compilation_units.Count);
				for(Int32 ssyy_i = 0; ssyy_i < _program_tree.compilation_units.Count; ssyy_i++)
				{
					if (_program_tree.compilation_units[ssyy_i] == null)
					{
						bw.Write((byte)0);
					}
					else
					{
						bw.Write((byte)1);
						_program_tree.compilation_units[ssyy_i].visit(this);
					}
				}
			}
		}
示例#2
0
 public override void visit(program_tree _program_tree)
 {
     throw new NotImplementedException();
 }
		public void visit(program_tree _program_tree)
		{
			bw.Write((Int16)22);
			write_program_tree(_program_tree);
		}
 public override void visit(program_tree _program_tree)
 {
     
 }
		public void read_program_tree(program_tree _program_tree)
		{
			read_syntax_tree_node(_program_tree);
			if (br.ReadByte() == 0)
			{
				_program_tree.compilation_units = null;
			}
			else
			{
				_program_tree.compilation_units = new List<compilation_unit>();
				Int32 ssyy_count = br.ReadInt32();
				for(Int32 ssyy_i = 0; ssyy_i < ssyy_count; ssyy_i++)
				{
					_program_tree.compilation_units.Add(_read_node() as compilation_unit);
				}
			}
		}
		public void visit(program_tree _program_tree)
		{
			read_program_tree(_program_tree);
		}
示例#7
0
		public override void visit(program_tree _program_tree)
		{
			//for(int i=0;i<_program_tree.compilation_units.Count;i++)
			//{
			//	subprogram_body sb=_program_tree.compilation_units[i];
			//	prepare_node(sb,"compilation_units["+i.ToString()+"]");
			//}
			prepare_collection(_program_tree.compilation_units,"compilation_units");
		}
示例#8
0
		public override void visit(program_tree _program_tree)
		{
			//text="Count: "+_program_tree.compilation_units.Count.ToString();
			get_count(_program_tree.compilation_units);
		}