2012-05-20 20:16:16 +03:00
|
|
|
/*
|
|
|
|
* subex.h - Substitution (execution)
|
|
|
|
*
|
|
|
|
* 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 SUBEX_H
|
|
|
|
#define SUBEX_H
|
|
|
|
|
2012-05-21 05:16:51 +03:00
|
|
|
#include "relop.h"
|
2012-05-20 20:16:16 +03:00
|
|
|
#include "subst.h"
|
|
|
|
|
|
|
|
|
|
|
|
struct var {
|
|
|
|
const char *name;
|
2012-05-21 05:16:51 +03:00
|
|
|
enum relop op;
|
2012-05-20 20:16:16 +03:00
|
|
|
const char *value;
|
|
|
|
struct var *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct var *substitute(const struct subst *sub, const struct var *in);
|
2012-05-21 05:16:51 +03:00
|
|
|
struct var *make_var(const char *name, enum relop op, const char *val);
|
2012-05-20 20:16:16 +03:00
|
|
|
const char *var_lookup(const struct var *vars, const char *name);
|
|
|
|
void free_vars(struct var *vars);
|
|
|
|
|
|
|
|
#endif /* !SUBEX_H */
|