1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-27 08:20:36 +02:00
eda-tools/b2/chr.h

60 lines
1.3 KiB
C
Raw Normal View History

2012-03-18 18:24:12 +02:00
/*
* chr.h - Part characteristics
*
* Copyright 2012 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef CHR_H
#define CHR_H
#include <stdio.h>
2012-03-18 18:24:12 +02:00
#include "param.h"
struct field;
struct action {
struct field *fields;
struct field *rules;
};
struct condition {
struct value value;
enum relop relop;
struct condition *next;
};
struct selector {
struct condition *cond;
struct action act;
struct selector *next;
};
struct field {
const char *name;
const struct format *fmt;
struct selector *sel;
struct action any;
struct field *next;
const struct field *prev;
};
const struct format *field_find(const char *name, const struct field *tail);
struct field *new_field(const char *name, const struct format *fmt,
const struct field *prev);
struct selector *new_selector(void);
struct condition *new_condition(enum relop relop, const char *word);
void field_finalize(struct field *field);
void fields_dump(FILE *file, const struct field *field);
void rules_dump(FILE *file, const struct field *field);
2012-03-18 18:24:12 +02:00
#endif /* !CHR_H */