summaryrefslogtreecommitdiff
path: root/sexpr.h
blob: 6719c3efd755f278a12f289f6b4bf056680e394e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef SEXPR_H
#define SEXPR_H

typedef struct YYLTYPE {
    int first_line;
    int first_column;
    int last_line;
    int last_column;
} YYLTYPE;
typedef YYLTYPE lloc_t;

#define YYLTYPE_IS_DECLARED 1
#define YYLTYPE_IS_TRIVIAL 1

typedef struct sexpr {
    int type;
    union contents {
        double f;
        char *s;
        int i;
        struct node {
            struct sexpr *l;
            struct sexpr *r;
        } n;
    } contents;
    lloc_t lloc;
} sexpr;

#endif /* SEXPR_H */