]> git.donarmstrong.com Git - lilypond.git/blob - table.cc
release: 0.0.3
[lilypond.git] / table.cc
1 #include "glob.hh"
2 #include "debug.hh"
3 #include "string.hh"
4 #include "keyword.hh"
5 #include "parser.hh"
6
7 static Keyword_ent  the_key_tab[]={
8     "voice", VOICE,
9     "rhythmstaff", RHYTHMSTAFF,
10     "score", SCORE,
11     "bar", BAR,
12     "output", OUTPUT,
13     0,0
14 } ;
15
16
17 int
18 lookup_keyword(String s)
19 {
20     static Keyword_table table(the_key_tab);
21     return table.lookup(s);
22 }
23
24 Assoc<String, Identifier*> the_id_tab;
25
26 Identifier*
27 lookup_identifier(String s)
28 {
29     if (!the_id_tab.elt_query(s))
30          the_id_tab[s]= new Identifier;
31     
32     return the_id_tab[s];
33 }