URL
https://opencores.org/ocsvn/c16/c16/trunk
[/] [c16/] [trunk/] [compiler/] [List.hh] - Diff between revs 26 and 29
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 26 |
Rev 29 |
Line 1... |
Line 1... |
// List.hh
|
// List.hh
|
#ifndef __LIST_HH_DEFINED__
|
#ifndef __LIST_HH_DEFINED__
|
#define __LIST_HH_DEFINED__
|
#define __LIST_HH_DEFINED__
|
|
|
|
#include
|
|
|
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
class Node
|
class Node
|
{
|
{
|
public:
|
public:
|
Node(const char * ntype);
|
Node(const char * ntype);
|
Line 53... |
Line 55... |
int ret = 0;
|
int ret = 0;
|
for (; l; l = l->tail) ret++;
|
for (; l; l = l->tail) ret++;
|
return ret;
|
return ret;
|
};
|
};
|
|
|
void List::EmitList(FILE * out)
|
void EmitList(FILE * out)
|
{
|
{
|
EmitStart(out);
|
EmitStart(out);
|
for (List * l = this; l; l = l->tail)
|
for (List * l = this; l; l = l->tail)
|
if (l->Head()) l->Head()->Emit(out);
|
if (l->Head()) l->Head()->Emit(out);
|
EmitEnd(out);
|
EmitEnd(out);
|
};
|
};
|
|
|
List * List::SetHead(C * hd)
|
List * SetHead(C * hd)
|
{
|
{
|
assert(head == 0);
|
assert(head == 0);
|
head = hd;
|
head = hd;
|
return this;
|
return this;
|
};
|
};
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.