Synopsis - Cross-Reference

File: src/Synopsis/PTree/generation.hh
 1//
 2// Copyright (C) 2004 Stefan Seefeld
 3// All rights reserved.
 4// Licensed to the public under the terms of the GNU LGPL (>= 2),
 5// see the file COPYING for details.
 6//
 7#ifndef Synopsis_PTree_generation_hh_
 8#define Synopsis_PTree_generation_hh_
 9
10#include <Synopsis/PTree/Node.hh>
11
12namespace Synopsis
13{
14namespace PTree
15{
16//. Head is used to implement qmake()
17class Head : public LightObject 
18{
19public:
20  Head() : ptree(0) {}
21  operator Node *() { return ptree;}
22  Head &operator + (Node *);
23  Head &operator + (const char*);
24  Head &operator + (char);
25  Head &operator + (int);
26
27private:
28  Node *append(Node *, Node *);
29  Node *append(Node *, const char *, size_t);
30
31  Node *ptree;
32};
33
34bool reify(Node *, unsigned int&);
35bool reify(Node *, const char*&);
36
37bool match(Node *, const char *, ...);
38Node *make(const char *pat, ...);
39Node *gen_sym();
40
41Node *qmake(const char *);
42}
43}
44
45#endif