mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 02:50:38 +02:00
59 lines
1.2 KiB
C
59 lines
1.2 KiB
C
/*
|
|
* 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>
|
|
|
|
#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 field_dump(FILE *file, const struct field *field);
|
|
|
|
#endif /* !CHR_H */
|