]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-lexer.cc
Merge branch 'jneeman' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond into jneeman
[lilypond.git] / lily / lily-lexer.cc
index 394e20089b9586676e6e40048d6196e14d76feee..8d70783cb5989da22c5eede795ac94bcf6f72cc3 100644 (file)
@@ -183,6 +183,26 @@ Lily_lexer::lookup_keyword (string s)
   return keytable_->lookup (s.c_str ());
 }
 
+SCM
+Lily_lexer::keyword_list () const
+{
+  if (!keytable_)
+    return SCM_EOL;
+  
+  SCM l = SCM_EOL;
+  SCM *tail = &l;
+  for (vsize i = 0; i < keytable_->table_.size (); i++)
+    {
+      *tail = scm_acons (scm_makfrom0str (keytable_->table_[i].name_),
+                        scm_from_int (keytable_->table_[i].tokcode_),
+                        SCM_EOL);
+
+      tail = SCM_CDRLOC(*tail);
+    }
+
+  return l;
+}
+
 SCM
 Lily_lexer::lookup_identifier_symbol (SCM sym)
 {