You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/11/23 18:43:13 UTC

[01/16] lucy-clownfish git commit: Rename CFCCClass to CFCCMan

Repository: lucy-clownfish
Updated Branches:
  refs/heads/markdown [created] f57df2fc2


Rename CFCCClass to CFCCMan


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/3c667722
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/3c667722
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/3c667722

Branch: refs/heads/markdown
Commit: 3c667722e541d901c8d054c0f5d63d00ad5138ee
Parents: 846b230
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 23 12:57:15 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:55 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCC.c      |   4 +-
 compiler/src/CFCCClass.c | 516 ------------------------------------------
 compiler/src/CFCCClass.h |  36 ---
 compiler/src/CFCCMan.c   | 516 ++++++++++++++++++++++++++++++++++++++++++
 compiler/src/CFCCMan.h   |  36 +++
 5 files changed, 554 insertions(+), 554 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3c667722/compiler/src/CFCC.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCC.c b/compiler/src/CFCC.c
index e6763ce..067e84e 100644
--- a/compiler/src/CFCC.c
+++ b/compiler/src/CFCC.c
@@ -22,7 +22,7 @@
 #define CFC_NEED_BASE_STRUCT_DEF
 #include "CFCBase.h"
 #include "CFCC.h"
-#include "CFCCClass.h"
+#include "CFCCMan.h"
 #include "CFCClass.h"
 #include "CFCHierarchy.h"
 #include "CFCMethod.h"
@@ -163,7 +163,7 @@ CFCC_write_man_pages(CFCC *self) {
         CFCClass *klass = ordered[i];
         if (CFCClass_included(klass)) { continue; }
 
-        char *man_page = CFCCClass_create_man_page(klass);
+        char *man_page = CFCCMan_create_man_page(klass);
         man_pages[j++] = man_page;
     }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3c667722/compiler/src/CFCCClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCClass.c b/compiler/src/CFCCClass.c
deleted file mode 100644
index b413990..0000000
--- a/compiler/src/CFCCClass.c
+++ /dev/null
@@ -1,516 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <string.h>
-
-#include "charmony.h"
-#include "CFCCClass.h"
-#include "CFCClass.h"
-#include "CFCDocuComment.h"
-#include "CFCFunction.h"
-#include "CFCMethod.h"
-#include "CFCParamList.h"
-#include "CFCSymbol.h"
-#include "CFCType.h"
-#include "CFCUtil.h"
-#include "CFCVariable.h"
-
-#ifndef true
-    #define true 1
-    #define false 0
-#endif
-
-typedef struct CFCPodLink {
-    size_t      total_size;
-    const char *text;
-    size_t      text_size;
-} CFCPodLink;
-
-static char*
-S_man_create_name(CFCClass *klass);
-
-static char*
-S_man_create_synopsis(CFCClass *klass);
-
-static char*
-S_man_create_description(CFCClass *klass);
-
-static char*
-S_man_create_functions(CFCClass *klass);
-
-static char*
-S_man_create_methods(CFCClass *klass);
-
-static char*
-S_man_create_inherited_methods(CFCClass *klass);
-
-static char*
-S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
-                  const char *full_sym);
-
-static char*
-S_man_create_param_list(CFCFunction *func, const char *full_sym);
-
-static char*
-S_man_create_inheritance(CFCClass *klass);
-
-static char*
-S_man_escape_content(const char *content);
-
-static void
-S_parse_pod_link(const char *content, CFCPodLink *pod_link);
-
-char*
-CFCCClass_create_man_page(CFCClass *klass) {
-    if (!CFCSymbol_public((CFCSymbol*)klass)) { return NULL; }
-
-    const char *class_name = CFCClass_get_class_name(klass);
-
-    // Create NAME.
-    char *name = S_man_create_name(klass);
-
-    // Create SYNOPSIS.
-    char *synopsis = S_man_create_synopsis(klass);
-
-    // Create DESCRIPTION.
-    char *description = S_man_create_description(klass);
-
-    // Create CONSTRUCTORS.
-    char *functions_man = S_man_create_functions(klass);
-
-    // Create METHODS, possibly including an ABSTRACT METHODS section.
-    char *methods_man = S_man_create_methods(klass);
-
-    // Build an INHERITANCE section describing class ancestry.
-    char *inheritance = S_man_create_inheritance(klass);
-
-    // Put it all together.
-    const char pattern[] =
-        ".TH %s 3\n"
-        "%s"
-        "%s"
-        "%s"
-        "%s"
-        "%s"
-        "%s";
-    char *man_page
-        = CFCUtil_sprintf(pattern, class_name, name, synopsis, description,
-                          functions_man, methods_man, inheritance);
-
-    FREEMEM(name);
-    FREEMEM(synopsis);
-    FREEMEM(description);
-    FREEMEM(functions_man);
-    FREEMEM(methods_man);
-    FREEMEM(inheritance);
-
-    return man_page;
-}
-
-static char*
-S_man_create_name(CFCClass *klass) {
-    char *result = CFCUtil_strdup(".SH NAME\n");
-    result = CFCUtil_cat(result, CFCClass_get_class_name(klass), NULL);
-
-    CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
-    if (docucom) {
-        const char *raw_brief = CFCDocuComment_get_brief(docucom);
-        if (raw_brief && raw_brief[0] != '\0') {
-            char *brief = S_man_escape_content(raw_brief);
-            result = CFCUtil_cat(result, " \\- ", brief, NULL);
-            FREEMEM(brief);
-        }
-    }
-
-    result = CFCUtil_cat(result, "\n", NULL);
-
-    return result;
-}
-
-static char*
-S_man_create_synopsis(CFCClass *klass) {
-    CHY_UNUSED_VAR(klass);
-    return CFCUtil_strdup("");
-}
-
-static char*
-S_man_create_description(CFCClass *klass) {
-    char *result  = CFCUtil_strdup("");
-
-    CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
-    if (!docucom) { return result; }
-
-    const char *raw_description = CFCDocuComment_get_long(docucom);
-    if (!raw_description || raw_description[0] == '\0') { return result; }
-
-    char *description = S_man_escape_content(raw_description);
-    result = CFCUtil_cat(result, ".SH DESCRIPTION\n", description, "\n", NULL);
-    FREEMEM(description);
-
-    return result;
-}
-
-static char*
-S_man_create_functions(CFCClass *klass) {
-    CFCFunction **functions = CFCClass_functions(klass);
-    char         *result    = CFCUtil_strdup("");
-
-    for (int func_num = 0; functions[func_num] != NULL; func_num++) {
-        CFCFunction *func = functions[func_num];
-        if (!CFCFunction_public(func)) { continue; }
-
-        if (result[0] == '\0') {
-            result = CFCUtil_cat(result, ".SH FUNCTIONS\n", NULL);
-        }
-
-        const char *micro_sym     = CFCFunction_micro_sym(func);
-        const char *full_func_sym = CFCFunction_full_func_sym(func);
-
-        char *redman = S_man_create_func(klass, func, micro_sym,
-                                         full_func_sym);
-        result = CFCUtil_cat(result, redman, NULL);
-        FREEMEM(redman);
-    }
-
-    return result;
-}
-
-static char*
-S_man_create_methods(CFCClass *klass) {
-    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
-    char       *methods_man   = CFCUtil_strdup("");
-    char       *novel_man     = CFCUtil_strdup("");
-    char       *result;
-
-    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
-        CFCMethod *method = fresh_methods[meth_num];
-        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
-            continue;
-        }
-
-        const char *macro_sym = CFCMethod_get_macro_sym(method);
-        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
-        char *method_man = S_man_create_func(klass, (CFCFunction*)method,
-                                             macro_sym, full_method_sym);
-
-        if (CFCMethod_abstract(method)) {
-            if (methods_man[0] == '\0') {
-                methods_man = CFCUtil_cat(methods_man,
-                                          ".SS Abstract methods\n", NULL);
-            }
-            methods_man = CFCUtil_cat(methods_man, method_man, NULL);
-        }
-        else {
-            if (novel_man[0] == '\0') {
-                novel_man = CFCUtil_cat(novel_man,
-                                        ".SS Novel methods\n", NULL);
-            }
-            novel_man = CFCUtil_cat(novel_man, method_man, NULL);
-        }
-
-        FREEMEM(method_man);
-        FREEMEM(full_method_sym);
-    }
-
-    methods_man = CFCUtil_cat(methods_man, novel_man, NULL);
-
-    // Add methods from parent classes excluding Clownfish::Obj
-    CFCClass *parent = CFCClass_get_parent(klass);
-    while (parent) {
-        if (strcmp(CFCClass_get_class_name(parent), "Clownfish::Obj") == 0) {
-            break;
-        }
-        char *inherited_man = S_man_create_inherited_methods(parent);
-        methods_man = CFCUtil_cat(methods_man, inherited_man, NULL);
-        FREEMEM(inherited_man);
-        parent = CFCClass_get_parent(parent);
-    }
-
-    if (methods_man[0] == '\0') {
-        result = CFCUtil_strdup("");
-    }
-    else {
-        result = CFCUtil_sprintf(".SH METHODS\n%s", methods_man);
-    }
-
-    FREEMEM(methods_man);
-    FREEMEM(novel_man);
-    FREEMEM(fresh_methods);
-    return result;
-}
-
-static char*
-S_man_create_inherited_methods(CFCClass *klass) {
-    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
-    char       *result        = CFCUtil_strdup("");
-
-    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
-        CFCMethod *method = fresh_methods[meth_num];
-        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
-            continue;
-        }
-
-        if (result[0] == '\0') {
-            result = CFCUtil_cat(result, ".SS Methods inherited from ",
-                                 CFCClass_get_class_name(klass), "\n", NULL);
-        }
-
-        const char *macro_sym = CFCMethod_get_macro_sym(method);
-        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
-        char *method_man = S_man_create_func(klass, (CFCFunction*)method,
-                                             macro_sym, full_method_sym);
-        result = CFCUtil_cat(result, method_man, NULL);
-
-        FREEMEM(method_man);
-        FREEMEM(full_method_sym);
-    }
-
-    FREEMEM(fresh_methods);
-    return result;
-}
-
-static char*
-S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
-                  const char *full_sym) {
-    CFCType    *return_type   = CFCFunction_get_return_type(func);
-    const char *return_type_c = CFCType_to_c(return_type);
-    const char *incremented   = "";
-
-    if (CFCType_incremented(return_type)) {
-        incremented = " // incremented";
-    }
-
-    char *param_list = S_man_create_param_list(func, full_sym);
-
-    const char *pattern =
-        ".TP\n"
-        ".B %s\n"
-        ".na\n"
-        "%s%s\n"
-        ".br\n"
-        "%s"
-        ".ad\n";
-    char *result = CFCUtil_sprintf(pattern, short_sym, return_type_c,
-                                   incremented, param_list);
-
-    FREEMEM(param_list);
-
-    // Get documentation, which may be inherited.
-    CFCDocuComment *docucomment = CFCFunction_get_docucomment(func);
-    if (!docucomment) {
-        const char *micro_sym = CFCFunction_micro_sym(func);
-        CFCClass *parent = klass;
-        while (NULL != (parent = CFCClass_get_parent(parent))) {
-            CFCFunction *parent_func
-                = (CFCFunction*)CFCClass_method(parent, micro_sym);
-            if (!parent_func) { break; }
-            docucomment = CFCFunction_get_docucomment(parent_func);
-            if (docucomment) { break; }
-        }
-    }
-
-    if (docucomment) {
-        // Description
-        const char *raw_desc = CFCDocuComment_get_description(docucomment);
-        char *desc = S_man_escape_content(raw_desc);
-        result = CFCUtil_cat(result, ".IP\n", desc, "\n", NULL);
-        FREEMEM(desc);
-
-        // Params
-        const char **param_names
-            = CFCDocuComment_get_param_names(docucomment);
-        const char **param_docs
-            = CFCDocuComment_get_param_docs(docucomment);
-        if (param_names[0]) {
-            result = CFCUtil_cat(result, ".RS\n", NULL);
-            for (size_t i = 0; param_names[i] != NULL; i++) {
-                char *doc = S_man_escape_content(param_docs[i]);
-                result = CFCUtil_cat(result, ".TP\n.I ", param_names[i],
-                                     "\n", doc, "\n", NULL);
-                FREEMEM(doc);
-            }
-            result = CFCUtil_cat(result, ".RE\n", NULL);
-        }
-
-        // Return value
-        const char *retval_doc = CFCDocuComment_get_retval(docucomment);
-        if (retval_doc && strlen(retval_doc)) {
-            char *doc = S_man_escape_content(retval_doc);
-            result = CFCUtil_cat(result, ".IP\n.B Returns:\n", doc, "\n",
-                                 NULL);
-            FREEMEM(doc);
-        }
-    }
-
-    return result;
-}
-
-static char*
-S_man_create_param_list(CFCFunction *func, const char *full_sym) {
-    CFCParamList  *param_list = CFCFunction_get_param_list(func);
-    CFCVariable  **variables  = CFCParamList_get_variables(param_list);
-
-    if (!variables[0]) {
-        return CFCUtil_sprintf(".BR %s (void);\n", full_sym);
-    }
-
-    char *result = CFCUtil_sprintf(".BR %s (", full_sym);
-
-    for (int i = 0; variables[i]; ++i) {
-        CFCVariable *variable = variables[i];
-        CFCType     *type     = CFCVariable_get_type(variable);
-        const char  *type_c   = CFCType_to_c(type);
-        const char  *name     = CFCVariable_micro_sym(variable);
-
-        result = CFCUtil_cat(result, "\n.br\n.RB \"    ", type_c, " \" ", name,
-                             NULL);
-
-        if (variables[i+1] || CFCType_decremented(type)) {
-            result = CFCUtil_cat(result, " \"", NULL);
-            if (variables[i+1]) {
-                result = CFCUtil_cat(result, ",", NULL);
-            }
-            else {
-                result = CFCUtil_cat(result, " // decremented", NULL);
-            }
-            result = CFCUtil_cat(result, "\"", NULL);
-        }
-    }
-
-    result = CFCUtil_cat(result, "\n.br\n);\n.br\n", NULL);
-
-    return result;
-}
-
-static char*
-S_man_create_inheritance(CFCClass *klass) {
-    CFCClass *ancestor = CFCClass_get_parent(klass);
-    char     *result   = CFCUtil_strdup("");
-
-    if (!ancestor) { return result; }
-
-    const char *class_name = CFCClass_get_class_name(klass);
-    result = CFCUtil_cat(result, ".SH INHERITANCE\n", class_name, NULL);
-    while (ancestor) {
-        const char *ancestor_name = CFCClass_get_class_name(ancestor);
-        result = CFCUtil_cat(result, " is a ", ancestor_name, NULL);
-        ancestor = CFCClass_get_parent(ancestor);
-    }
-    result = CFCUtil_cat(result, ".\n", NULL);
-
-    return result;
-}
-
-static char*
-S_man_escape_content(const char *content) {
-    size_t  result_len = 0;
-    size_t  result_cap = strlen(content) + 256;
-    char   *result     = (char*)MALLOCATE(result_cap + 1);
-
-    for (size_t i = 0; content[i]; i++) {
-        const char *subst      = content + i;
-        size_t      subst_size = 1;
-
-        switch (content[i]) {
-            case '\\':
-                // Escape backslash.
-                subst      = "\\e";
-                subst_size = 2;
-                break;
-            case '-':
-                // Escape hyphen.
-                subst      = "\\-";
-                subst_size = 2;
-                break;
-            case '\n':
-                // Escape dot after newline.
-                if (content[i+1] == '.') {
-                    subst      = "\n\\";
-                    subst_size = 2;
-                }
-                break;
-            case '<':
-                // <code> markup.
-                if (strncmp(content + i + 1, "code>", 5) == 0) {
-                    subst      = "\\fI";
-                    subst_size = 3;
-                    i += 5;
-                }
-                else if (strncmp(content + i + 1, "/code>", 6) == 0) {
-                    subst      = "\\fP";
-                    subst_size = 3;
-                    i += 6;
-                }
-                break;
-            case 'L':
-                if (content[i+1] == '<') {
-                    // POD-style link.
-                    struct CFCPodLink pod_link;
-                    S_parse_pod_link(content + i + 2, &pod_link);
-                    if (pod_link.total_size) {
-                        subst      = pod_link.text;
-                        subst_size = pod_link.text_size;
-                        i += pod_link.total_size + 1;
-                    }
-                }
-                break;
-            default:
-                break;
-        }
-
-        if (result_len + subst_size > result_cap) {
-            result_cap += 256;
-            result = (char*)REALLOCATE(result, result_cap + 1);
-        }
-
-        memcpy(result + result_len, subst, subst_size);
-        result_len += subst_size;
-    }
-
-    result[result_len] = '\0';
-
-    return result;
-}
-
-// Quick and dirty parsing of POD links. The syntax isn't fully supported
-// and the result isn't man-escaped. But it should be good enough for now
-// since at some point we'll switch to another format anyway.
-static void
-S_parse_pod_link(const char *content, CFCPodLink *pod_link) {
-    int in_text = true;
-
-    for (size_t i = 0; i < 256 && content[i]; ++i) {
-        if (content[i] == '|') {
-            if (in_text) {
-                pod_link->text_size = i;
-                in_text = false;
-            }
-        }
-        else if (content[i] == '>') {
-            pod_link->total_size = i + 1;
-            pod_link->text       = content;
-            if (in_text) {
-                pod_link->text_size = i;
-            }
-            return;
-        }
-    }
-
-    pod_link->total_size = 0;
-    pod_link->text       = NULL;
-    pod_link->text_size  = 0;
-}
-

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3c667722/compiler/src/CFCCClass.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCClass.h b/compiler/src/CFCCClass.h
deleted file mode 100644
index 710278d..0000000
--- a/compiler/src/CFCCClass.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef H_CFCCCLASS
-#define H_CFCCCLASS
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct CFCClass;
-
-/** Return the man page for the class.
- */
-char*
-CFCCClass_create_man_page(struct CFCClass *klass);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* H_CFCCCLASS */
-

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3c667722/compiler/src/CFCCMan.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCMan.c b/compiler/src/CFCCMan.c
new file mode 100644
index 0000000..17ad340
--- /dev/null
+++ b/compiler/src/CFCCMan.c
@@ -0,0 +1,516 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+
+#include "charmony.h"
+#include "CFCCMan.h"
+#include "CFCClass.h"
+#include "CFCDocuComment.h"
+#include "CFCFunction.h"
+#include "CFCMethod.h"
+#include "CFCParamList.h"
+#include "CFCSymbol.h"
+#include "CFCType.h"
+#include "CFCUtil.h"
+#include "CFCVariable.h"
+
+#ifndef true
+    #define true 1
+    #define false 0
+#endif
+
+typedef struct CFCPodLink {
+    size_t      total_size;
+    const char *text;
+    size_t      text_size;
+} CFCPodLink;
+
+static char*
+S_man_create_name(CFCClass *klass);
+
+static char*
+S_man_create_synopsis(CFCClass *klass);
+
+static char*
+S_man_create_description(CFCClass *klass);
+
+static char*
+S_man_create_functions(CFCClass *klass);
+
+static char*
+S_man_create_methods(CFCClass *klass);
+
+static char*
+S_man_create_inherited_methods(CFCClass *klass);
+
+static char*
+S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
+                  const char *full_sym);
+
+static char*
+S_man_create_param_list(CFCFunction *func, const char *full_sym);
+
+static char*
+S_man_create_inheritance(CFCClass *klass);
+
+static char*
+S_man_escape_content(const char *content);
+
+static void
+S_parse_pod_link(const char *content, CFCPodLink *pod_link);
+
+char*
+CFCCMan_create_man_page(CFCClass *klass) {
+    if (!CFCSymbol_public((CFCSymbol*)klass)) { return NULL; }
+
+    const char *class_name = CFCClass_get_class_name(klass);
+
+    // Create NAME.
+    char *name = S_man_create_name(klass);
+
+    // Create SYNOPSIS.
+    char *synopsis = S_man_create_synopsis(klass);
+
+    // Create DESCRIPTION.
+    char *description = S_man_create_description(klass);
+
+    // Create CONSTRUCTORS.
+    char *functions_man = S_man_create_functions(klass);
+
+    // Create METHODS, possibly including an ABSTRACT METHODS section.
+    char *methods_man = S_man_create_methods(klass);
+
+    // Build an INHERITANCE section describing class ancestry.
+    char *inheritance = S_man_create_inheritance(klass);
+
+    // Put it all together.
+    const char pattern[] =
+        ".TH %s 3\n"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
+        "%s";
+    char *man_page
+        = CFCUtil_sprintf(pattern, class_name, name, synopsis, description,
+                          functions_man, methods_man, inheritance);
+
+    FREEMEM(name);
+    FREEMEM(synopsis);
+    FREEMEM(description);
+    FREEMEM(functions_man);
+    FREEMEM(methods_man);
+    FREEMEM(inheritance);
+
+    return man_page;
+}
+
+static char*
+S_man_create_name(CFCClass *klass) {
+    char *result = CFCUtil_strdup(".SH NAME\n");
+    result = CFCUtil_cat(result, CFCClass_get_class_name(klass), NULL);
+
+    CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
+    if (docucom) {
+        const char *raw_brief = CFCDocuComment_get_brief(docucom);
+        if (raw_brief && raw_brief[0] != '\0') {
+            char *brief = S_man_escape_content(raw_brief);
+            result = CFCUtil_cat(result, " \\- ", brief, NULL);
+            FREEMEM(brief);
+        }
+    }
+
+    result = CFCUtil_cat(result, "\n", NULL);
+
+    return result;
+}
+
+static char*
+S_man_create_synopsis(CFCClass *klass) {
+    CHY_UNUSED_VAR(klass);
+    return CFCUtil_strdup("");
+}
+
+static char*
+S_man_create_description(CFCClass *klass) {
+    char *result  = CFCUtil_strdup("");
+
+    CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
+    if (!docucom) { return result; }
+
+    const char *raw_description = CFCDocuComment_get_long(docucom);
+    if (!raw_description || raw_description[0] == '\0') { return result; }
+
+    char *description = S_man_escape_content(raw_description);
+    result = CFCUtil_cat(result, ".SH DESCRIPTION\n", description, "\n", NULL);
+    FREEMEM(description);
+
+    return result;
+}
+
+static char*
+S_man_create_functions(CFCClass *klass) {
+    CFCFunction **functions = CFCClass_functions(klass);
+    char         *result    = CFCUtil_strdup("");
+
+    for (int func_num = 0; functions[func_num] != NULL; func_num++) {
+        CFCFunction *func = functions[func_num];
+        if (!CFCFunction_public(func)) { continue; }
+
+        if (result[0] == '\0') {
+            result = CFCUtil_cat(result, ".SH FUNCTIONS\n", NULL);
+        }
+
+        const char *micro_sym     = CFCFunction_micro_sym(func);
+        const char *full_func_sym = CFCFunction_full_func_sym(func);
+
+        char *redman = S_man_create_func(klass, func, micro_sym,
+                                         full_func_sym);
+        result = CFCUtil_cat(result, redman, NULL);
+        FREEMEM(redman);
+    }
+
+    return result;
+}
+
+static char*
+S_man_create_methods(CFCClass *klass) {
+    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
+    char       *methods_man   = CFCUtil_strdup("");
+    char       *novel_man     = CFCUtil_strdup("");
+    char       *result;
+
+    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
+        CFCMethod *method = fresh_methods[meth_num];
+        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
+            continue;
+        }
+
+        const char *macro_sym = CFCMethod_get_macro_sym(method);
+        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
+        char *method_man = S_man_create_func(klass, (CFCFunction*)method,
+                                             macro_sym, full_method_sym);
+
+        if (CFCMethod_abstract(method)) {
+            if (methods_man[0] == '\0') {
+                methods_man = CFCUtil_cat(methods_man,
+                                          ".SS Abstract methods\n", NULL);
+            }
+            methods_man = CFCUtil_cat(methods_man, method_man, NULL);
+        }
+        else {
+            if (novel_man[0] == '\0') {
+                novel_man = CFCUtil_cat(novel_man,
+                                        ".SS Novel methods\n", NULL);
+            }
+            novel_man = CFCUtil_cat(novel_man, method_man, NULL);
+        }
+
+        FREEMEM(method_man);
+        FREEMEM(full_method_sym);
+    }
+
+    methods_man = CFCUtil_cat(methods_man, novel_man, NULL);
+
+    // Add methods from parent classes excluding Clownfish::Obj
+    CFCClass *parent = CFCClass_get_parent(klass);
+    while (parent) {
+        if (strcmp(CFCClass_get_class_name(parent), "Clownfish::Obj") == 0) {
+            break;
+        }
+        char *inherited_man = S_man_create_inherited_methods(parent);
+        methods_man = CFCUtil_cat(methods_man, inherited_man, NULL);
+        FREEMEM(inherited_man);
+        parent = CFCClass_get_parent(parent);
+    }
+
+    if (methods_man[0] == '\0') {
+        result = CFCUtil_strdup("");
+    }
+    else {
+        result = CFCUtil_sprintf(".SH METHODS\n%s", methods_man);
+    }
+
+    FREEMEM(methods_man);
+    FREEMEM(novel_man);
+    FREEMEM(fresh_methods);
+    return result;
+}
+
+static char*
+S_man_create_inherited_methods(CFCClass *klass) {
+    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
+    char       *result        = CFCUtil_strdup("");
+
+    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
+        CFCMethod *method = fresh_methods[meth_num];
+        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
+            continue;
+        }
+
+        if (result[0] == '\0') {
+            result = CFCUtil_cat(result, ".SS Methods inherited from ",
+                                 CFCClass_get_class_name(klass), "\n", NULL);
+        }
+
+        const char *macro_sym = CFCMethod_get_macro_sym(method);
+        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
+        char *method_man = S_man_create_func(klass, (CFCFunction*)method,
+                                             macro_sym, full_method_sym);
+        result = CFCUtil_cat(result, method_man, NULL);
+
+        FREEMEM(method_man);
+        FREEMEM(full_method_sym);
+    }
+
+    FREEMEM(fresh_methods);
+    return result;
+}
+
+static char*
+S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
+                  const char *full_sym) {
+    CFCType    *return_type   = CFCFunction_get_return_type(func);
+    const char *return_type_c = CFCType_to_c(return_type);
+    const char *incremented   = "";
+
+    if (CFCType_incremented(return_type)) {
+        incremented = " // incremented";
+    }
+
+    char *param_list = S_man_create_param_list(func, full_sym);
+
+    const char *pattern =
+        ".TP\n"
+        ".B %s\n"
+        ".na\n"
+        "%s%s\n"
+        ".br\n"
+        "%s"
+        ".ad\n";
+    char *result = CFCUtil_sprintf(pattern, short_sym, return_type_c,
+                                   incremented, param_list);
+
+    FREEMEM(param_list);
+
+    // Get documentation, which may be inherited.
+    CFCDocuComment *docucomment = CFCFunction_get_docucomment(func);
+    if (!docucomment) {
+        const char *micro_sym = CFCFunction_micro_sym(func);
+        CFCClass *parent = klass;
+        while (NULL != (parent = CFCClass_get_parent(parent))) {
+            CFCFunction *parent_func
+                = (CFCFunction*)CFCClass_method(parent, micro_sym);
+            if (!parent_func) { break; }
+            docucomment = CFCFunction_get_docucomment(parent_func);
+            if (docucomment) { break; }
+        }
+    }
+
+    if (docucomment) {
+        // Description
+        const char *raw_desc = CFCDocuComment_get_description(docucomment);
+        char *desc = S_man_escape_content(raw_desc);
+        result = CFCUtil_cat(result, ".IP\n", desc, "\n", NULL);
+        FREEMEM(desc);
+
+        // Params
+        const char **param_names
+            = CFCDocuComment_get_param_names(docucomment);
+        const char **param_docs
+            = CFCDocuComment_get_param_docs(docucomment);
+        if (param_names[0]) {
+            result = CFCUtil_cat(result, ".RS\n", NULL);
+            for (size_t i = 0; param_names[i] != NULL; i++) {
+                char *doc = S_man_escape_content(param_docs[i]);
+                result = CFCUtil_cat(result, ".TP\n.I ", param_names[i],
+                                     "\n", doc, "\n", NULL);
+                FREEMEM(doc);
+            }
+            result = CFCUtil_cat(result, ".RE\n", NULL);
+        }
+
+        // Return value
+        const char *retval_doc = CFCDocuComment_get_retval(docucomment);
+        if (retval_doc && strlen(retval_doc)) {
+            char *doc = S_man_escape_content(retval_doc);
+            result = CFCUtil_cat(result, ".IP\n.B Returns:\n", doc, "\n",
+                                 NULL);
+            FREEMEM(doc);
+        }
+    }
+
+    return result;
+}
+
+static char*
+S_man_create_param_list(CFCFunction *func, const char *full_sym) {
+    CFCParamList  *param_list = CFCFunction_get_param_list(func);
+    CFCVariable  **variables  = CFCParamList_get_variables(param_list);
+
+    if (!variables[0]) {
+        return CFCUtil_sprintf(".BR %s (void);\n", full_sym);
+    }
+
+    char *result = CFCUtil_sprintf(".BR %s (", full_sym);
+
+    for (int i = 0; variables[i]; ++i) {
+        CFCVariable *variable = variables[i];
+        CFCType     *type     = CFCVariable_get_type(variable);
+        const char  *type_c   = CFCType_to_c(type);
+        const char  *name     = CFCVariable_micro_sym(variable);
+
+        result = CFCUtil_cat(result, "\n.br\n.RB \"    ", type_c, " \" ", name,
+                             NULL);
+
+        if (variables[i+1] || CFCType_decremented(type)) {
+            result = CFCUtil_cat(result, " \"", NULL);
+            if (variables[i+1]) {
+                result = CFCUtil_cat(result, ",", NULL);
+            }
+            else {
+                result = CFCUtil_cat(result, " // decremented", NULL);
+            }
+            result = CFCUtil_cat(result, "\"", NULL);
+        }
+    }
+
+    result = CFCUtil_cat(result, "\n.br\n);\n.br\n", NULL);
+
+    return result;
+}
+
+static char*
+S_man_create_inheritance(CFCClass *klass) {
+    CFCClass *ancestor = CFCClass_get_parent(klass);
+    char     *result   = CFCUtil_strdup("");
+
+    if (!ancestor) { return result; }
+
+    const char *class_name = CFCClass_get_class_name(klass);
+    result = CFCUtil_cat(result, ".SH INHERITANCE\n", class_name, NULL);
+    while (ancestor) {
+        const char *ancestor_name = CFCClass_get_class_name(ancestor);
+        result = CFCUtil_cat(result, " is a ", ancestor_name, NULL);
+        ancestor = CFCClass_get_parent(ancestor);
+    }
+    result = CFCUtil_cat(result, ".\n", NULL);
+
+    return result;
+}
+
+static char*
+S_man_escape_content(const char *content) {
+    size_t  result_len = 0;
+    size_t  result_cap = strlen(content) + 256;
+    char   *result     = (char*)MALLOCATE(result_cap + 1);
+
+    for (size_t i = 0; content[i]; i++) {
+        const char *subst      = content + i;
+        size_t      subst_size = 1;
+
+        switch (content[i]) {
+            case '\\':
+                // Escape backslash.
+                subst      = "\\e";
+                subst_size = 2;
+                break;
+            case '-':
+                // Escape hyphen.
+                subst      = "\\-";
+                subst_size = 2;
+                break;
+            case '\n':
+                // Escape dot after newline.
+                if (content[i+1] == '.') {
+                    subst      = "\n\\";
+                    subst_size = 2;
+                }
+                break;
+            case '<':
+                // <code> markup.
+                if (strncmp(content + i + 1, "code>", 5) == 0) {
+                    subst      = "\\fI";
+                    subst_size = 3;
+                    i += 5;
+                }
+                else if (strncmp(content + i + 1, "/code>", 6) == 0) {
+                    subst      = "\\fP";
+                    subst_size = 3;
+                    i += 6;
+                }
+                break;
+            case 'L':
+                if (content[i+1] == '<') {
+                    // POD-style link.
+                    struct CFCPodLink pod_link;
+                    S_parse_pod_link(content + i + 2, &pod_link);
+                    if (pod_link.total_size) {
+                        subst      = pod_link.text;
+                        subst_size = pod_link.text_size;
+                        i += pod_link.total_size + 1;
+                    }
+                }
+                break;
+            default:
+                break;
+        }
+
+        if (result_len + subst_size > result_cap) {
+            result_cap += 256;
+            result = (char*)REALLOCATE(result, result_cap + 1);
+        }
+
+        memcpy(result + result_len, subst, subst_size);
+        result_len += subst_size;
+    }
+
+    result[result_len] = '\0';
+
+    return result;
+}
+
+// Quick and dirty parsing of POD links. The syntax isn't fully supported
+// and the result isn't man-escaped. But it should be good enough for now
+// since at some point we'll switch to another format anyway.
+static void
+S_parse_pod_link(const char *content, CFCPodLink *pod_link) {
+    int in_text = true;
+
+    for (size_t i = 0; i < 256 && content[i]; ++i) {
+        if (content[i] == '|') {
+            if (in_text) {
+                pod_link->text_size = i;
+                in_text = false;
+            }
+        }
+        else if (content[i] == '>') {
+            pod_link->total_size = i + 1;
+            pod_link->text       = content;
+            if (in_text) {
+                pod_link->text_size = i;
+            }
+            return;
+        }
+    }
+
+    pod_link->total_size = 0;
+    pod_link->text       = NULL;
+    pod_link->text_size  = 0;
+}
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/3c667722/compiler/src/CFCCMan.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCMan.h b/compiler/src/CFCCMan.h
new file mode 100644
index 0000000..4c7b8e4
--- /dev/null
+++ b/compiler/src/CFCCMan.h
@@ -0,0 +1,36 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef H_CFCCMAN
+#define H_CFCCMAN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct CFCClass;
+
+/** Return the man page for the class.
+ */
+char*
+CFCCMan_create_man_page(struct CFCClass *klass);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_CFCCMAN */
+


[12/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
Add CommonMark source files

Add the following files from the CommonMark source tree as of commit
4570eb2bff2e1b71fa5b6408abbc69c98ff5ff24 from Sat Nov 22 22:39:26 2014
-0800:

* LICENSE
* README.md
* All files in src excluding main.c and bench.h
* scanners.c generated from scanners.re with re2c
* Bug fix in blocks.c
* Add custom versions of config.h and cmark_export.h


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/144f0b22
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/144f0b22
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/144f0b22

Branch: refs/heads/markdown
Commit: 144f0b229e9677d5dc2ab699b541451aa0e3cbc2
Parents: 3c66772
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 13:29:15 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:56 2014 +0100

----------------------------------------------------------------------
 compiler/modules/CommonMark/LICENSE             |    70 +
 compiler/modules/CommonMark/README.md           |   290 +
 compiler/modules/CommonMark/src/blocks.c        |   832 ++
 compiler/modules/CommonMark/src/buffer.c        |   375 +
 compiler/modules/CommonMark/src/buffer.h        |   178 +
 .../modules/CommonMark/src/case_fold_switch.inc |  2637 ++++
 compiler/modules/CommonMark/src/chunk.h         |   123 +
 compiler/modules/CommonMark/src/cmark.c         |    22 +
 compiler/modules/CommonMark/src/cmark.h         |   245 +
 compiler/modules/CommonMark/src/cmark_export.h  |     7 +
 compiler/modules/CommonMark/src/config.h        |    11 +
 compiler/modules/CommonMark/src/config.h.in     |    17 +
 compiler/modules/CommonMark/src/debug.h         |    36 +
 compiler/modules/CommonMark/src/html/houdini.h  |    52 +
 .../CommonMark/src/html/houdini_href_e.c        |   107 +
 .../CommonMark/src/html/houdini_html_e.c        |    81 +
 .../CommonMark/src/html/houdini_html_u.c        |   112 +
 compiler/modules/CommonMark/src/html/html.c     |   361 +
 .../CommonMark/src/html/html_unescape.gperf     |  2131 +++
 .../modules/CommonMark/src/html/html_unescape.h |  9736 +++++++++++++
 compiler/modules/CommonMark/src/inlines.c       |   993 ++
 compiler/modules/CommonMark/src/inlines.h       |    26 +
 compiler/modules/CommonMark/src/node.c          |   657 +
 compiler/modules/CommonMark/src/node.h          |    74 +
 compiler/modules/CommonMark/src/parser.h        |    27 +
 compiler/modules/CommonMark/src/print.c         |   182 +
 compiler/modules/CommonMark/src/references.c    |   153 +
 compiler/modules/CommonMark/src/references.h    |    46 +
 compiler/modules/CommonMark/src/scanners.c      | 12398 +++++++++++++++++
 compiler/modules/CommonMark/src/scanners.h      |    38 +
 compiler/modules/CommonMark/src/scanners.re     |   235 +
 compiler/modules/CommonMark/src/utf8.c          |   403 +
 compiler/modules/CommonMark/src/utf8.h          |    23 +
 33 files changed, 32678 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/LICENSE
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/LICENSE b/compiler/modules/CommonMark/LICENSE
new file mode 100644
index 0000000..c8377be
--- /dev/null
+++ b/compiler/modules/CommonMark/LICENSE
@@ -0,0 +1,70 @@
+Copyright (c) 2014, John MacFarlane
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of John MacFarlane nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-----
+
+The polyfill for String.fromCodePoint included in commonmark.js is
+Copyright Mathias Bynens <http://mathiasbynens.be/>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+-----
+
+The normalization code in runtests.py was derived from the
+markdowntest project, Copyright 2013 Karl Dubost:
+
+The MIT License (MIT)
+
+Copyright (c) 2013 Karl Dubost
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/README.md
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/README.md b/compiler/modules/CommonMark/README.md
new file mode 100644
index 0000000..32ed91d
--- /dev/null
+++ b/compiler/modules/CommonMark/README.md
@@ -0,0 +1,290 @@
+CommonMark
+==========
+
+CommonMark is a rationalized version of Markdown syntax,
+with a [spec][the spec] and BSD3-licensed reference
+implementations in C and JavaScript.
+
+[Try it now!](http://spec.commonmark.org/dingus.html)
+
+The implementations
+-------------------
+
+The C implementation provides both a shared library (`libcmark`) and a
+standalone program `cmark` that converts CommonMark to HTML.  It is
+written in standard C99 and has no library dependencies.  The parser is
+very fast (see [benchmarks](benchmarks.md)).
+
+It is easy to use `libcmark` in python or ruby code:  see `wrapper.py`
+and `wrapper.rb` in the repository for simple examples.
+
+The JavaScript implementation is a single JavaScript file, with
+no dependencies, that can be linked to in an HTML page.  Here
+is a simple usage example:
+
+``` javascript
+var reader = new commonmark.DocParser();
+var writer = new commonmark.HtmlRenderer();
+var parsed = reader.parse("Hello *world*");
+var result = writer.render(parsed);
+```
+
+A node package is also available; it includes a command-line tool called
+`commonmark`.
+
+**A note on security:**
+Neither implementation attempts to sanitize link attributes or
+raw HTML.  If you use these libraries in applications that accept
+untrusted user input, you must run the output through an HTML
+sanitizer to protect against
+[XSS attacks](http://en.wikipedia.org/wiki/Cross-site_scripting).
+
+Installing (C)
+--------------
+
+Building the C program (`cmark`) and shared library (`libcmark`)
+requires [cmake] and [re2c], which is used to generate `scanners.c` from
+`scanners.re`.  (Note that [re2c] is only a build dependency for
+developers, since `scanners.c` can be provided in a released source
+tarball.)
+
+If you have GNU make, you can simply `make`, `make test`, and `make
+install`.  This calls [cmake] to create a `Makefile` in the `build`
+directory, then uses that `Makefile` to create the executable and
+library.
+
+For a more portable method, you can use [cmake] manually. [cmake] knows
+how to create build environments for many build systems.  For example,
+on FreeBSD:
+
+    mkdir build
+    cd build
+    cmake ..  # optionally: -DCMAKE_INSTALL_PREFIX=path
+    make      # executable will be create as build/src/cmake
+    make test
+    make install
+
+Or, to create Xcode project files on OSX:
+
+    mkdir build
+    cd build
+    cmake -G Xcode ..
+    make
+    make test
+    make install
+
+Tests can also be run manually on any executable `$PROG` using:
+
+    python runtests.py --program $PROG
+
+The GNU Makefile also provides a few other targets for developers.
+To run a "fuzz test" against ten long randomly generated inputs:
+
+    make fuzztest
+
+To run a test for memory leaks using valgrind:
+
+    make leakcheck
+
+To make a release tarball and zip archive:
+
+    make archive
+
+To test the archives:
+
+    make testarchive
+
+Compiling for Windows
+---------------------
+
+You can cross-compile a Windows binary and dll on linux if you have the
+`mingw32` compiler:
+
+    make mingw
+
+The binaries will be in `build-mingw/windows/bin`.
+
+Installing (JavaScript)
+-----------------------
+
+The JavaScript library can be installed through `npm`:
+
+    npm install commonmark
+
+To build the JavaScript library as a single standalone file:
+
+    browserify --standalone commonmark js/lib/index.js -o js/commonmark.js
+
+Or fetch a pre-built copy from
+<http://spec.commonmark.org/js/commonmark.js>`.
+
+To run tests for the JavaScript library:
+
+    make testjs
+
+or
+
+    node js/test.js
+
+The spec
+--------
+
+[The spec] contains over 500 embedded examples which serve as conformance
+tests.  To run the tests for `cmark`, do `make test`.  To run them for
+another Markdown program, say `myprog`, do `make test PROG=myprog`.  To
+run the tests for `commonmark.js`, do `make testjs`.
+
+[The spec]:  http://jgm.github.io/CommonMark/spec.html
+
+The source of [the spec] is `spec.txt`.  This is basically a Markdown
+file, with code examples written in a shorthand form:
+
+    .
+    Markdown source
+    .
+    expected HTML output
+    .
+
+To build an HTML version of the spec, do `make spec.html`.  To build a
+PDF version, do `make spec.pdf`.  Both these commands require that
+[pandoc] is installed, and creating a PDF requires a latex installation.
+
+The spec is written from the point of view of the human writer, not
+the computer reader.  It is not an algorithm---an English translation of
+a computer program---but a declarative description of what counts as a block
+quote, a code block, and each of the other structural elements that can
+make up a Markdown document.
+
+Because John Gruber's [canonical syntax
+description](http://daringfireball.net/projects/markdown/syntax) leaves
+many aspects of the syntax undetermined, writing a precise spec requires
+making a large number of decisions, many of them somewhat arbitrary.
+In making them, we have appealed to existing conventions and
+considerations of simplicity, readability, expressive power, and
+consistency.  We have tried to ensure that "normal" documents in the many
+incompatible existing implementations of Markdown will render, as far as
+possible, as their authors intended.  And we have tried to make the rules
+for different elements work together harmoniously.  In places where
+different decisions could have been made (for example, the rules
+governing list indentation), we have explained the rationale for
+my choices.  In a few cases, we have departed slightly from the canonical
+syntax description, in ways that we think further the goals of Markdown
+as stated in that description.
+
+For the most part, we have limited ourselves to the basic elements
+described in Gruber's canonical syntax description, eschewing extensions
+like footnotes and definition lists.  It is important to get the core
+right before considering such things. However, we have included a visible
+syntax for line breaks and fenced code blocks.
+
+Differences from original Markdown
+----------------------------------
+
+There are only a few places where this spec says things that contradict
+the canonical syntax description:
+
+-   It [allows all punctuation symbols to be
+    backslash-escaped](http://jgm.github.io/CommonMark/spec.html#backslash-escapes),
+    not just the symbols with special meanings in Markdown. We found
+    that it was just too hard to remember which symbols could be
+    escaped.
+
+-   It introduces an [alternative syntax for hard line
+    breaks](http://jgm.github.io/CommonMark/spec.html#hard-line-breaks), a
+    backslash at the end of the line, supplementing the
+    two-spaces-at-the-end-of-line rule. This is motivated by persistent
+    complaints about the “invisible” nature of the two-space rule.
+
+-   Link syntax has been made a bit more predictable (in a
+    backwards-compatible way). For example, `Markdown.pl` allows single
+    quotes around a title in inline links, but not in reference links.
+    This kind of difference is really hard for users to remember, so the
+    spec [allows single quotes in both
+    contexts](http://jgm.github.io/CommonMark/spec.html#links).
+
+-   The rule for HTML blocks differs, though in most real cases it
+    shouldn't make a difference. (See
+    [here](http://jgm.github.io/CommonMark/spec.html#html-blocks) for
+    details.) The spec's proposal makes it easy to include Markdown
+    inside HTML block-level tags, if you want to, but also allows you to
+    exclude this. It is also makes parsing much easier, avoiding
+    expensive backtracking.
+
+-   It does not collapse adjacent bird-track blocks into a single
+    blockquote:
+
+        > this is two
+
+        > blockquotes
+
+        > this is a single
+        >
+        > blockquote with two paragraphs
+
+-   Rules for content in lists differ in a few respects, though (as with
+    HTML blocks), most lists in existing documents should render as
+    intended. There is some discussion of the choice points and
+    differences [here](http://jgm.github.io/CommonMark/spec.html#motivation).
+    We think that the spec's proposal does better than any existing
+    implementation in rendering lists the way a human writer or reader
+    would intuitively understand them. (We could give numerous examples
+    of perfectly natural looking lists that nearly every existing
+    implementation flubs up.)
+
+-   The spec stipulates that two blank lines break out of all list
+    contexts.  This is an attempt to deal with issues that often come up
+    when someone wants to have two adjacent lists, or a list followed by
+    an indented code block.
+
+-   Changing bullet characters, or changing from bullets to numbers or
+    vice versa, starts a new list. We think that is almost always going
+    to be the writer's intent.
+
+-   The number that begins an ordered list item may be followed by
+    either `.` or `)`. Changing the delimiter style starts a new
+    list.
+
+-   The start number of an ordered list is significant.
+
+-   [Fenced code blocks](http://jgm.github.io/CommonMark/spec.html#fenced-code-blocks) are supported, delimited by either
+    backticks (```` ``` ```` or tildes (` ~~~ `).
+
+Contributing
+------------
+
+There is a [forum for discussing
+CommonMark](http://talk.commonmark.org); you should use it instead of
+github issues for questions and possibly open-ended discussions.
+Use the [github issue tracker](http://github.com/jgm/CommonMark/issues)
+only for simple, clear, actionable issues.
+
+Authors
+-------
+
+The spec was written by John MacFarlane, drawing on
+
+- his experience writing and maintaining Markdown implementations in several
+  languages, including the first Markdown parser not based on regular
+  expression substitutions ([pandoc](http://github.com/jgm/pandoc)) and
+  the first markdown parsers based on PEG grammars
+  ([peg-markdown](http://github.com/jgm/peg-markdown),
+  [lunamark](http://github.com/jgm/lunamark))
+- a detailed examination of the differences between existing Markdown
+  implementations using [BabelMark 2](http://johnmacfarlane.net/babelmark2/),
+  and
+- extensive discussions with David Greenspan, Jeff Atwood, Vicent
+  Marti, Neil Williams, and Benjamin Dumke-von der Ehe.
+
+John MacFarlane was also responsible for the original versions of the
+C and JavaScript implementations.  The block parsing algorithm was
+worked out together with David Greenspan.  Vicent Marti
+optimized the C implementation for performance, increasing its speed
+tenfold.  Kārlis Gaņģis helped work out a better parsing algorithm
+for links and emphasis, eliminating several worst-case performance
+issues.  Nick Wellnhofer contributed many improvements, including
+most of the C library's API and its test harness.
+
+[cmake]: http://www.cmake.org/download/
+[pandoc]: http://johnmacfarlane.net/pandoc/
+[re2c]: http://re2c.org
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/blocks.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/blocks.c b/compiler/modules/CommonMark/src/blocks.c
new file mode 100644
index 0000000..c74b425
--- /dev/null
+++ b/compiler/modules/CommonMark/src/blocks.c
@@ -0,0 +1,832 @@
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "config.h"
+#include "parser.h"
+#include "cmark.h"
+#include "node.h"
+#include "references.h"
+#include "utf8.h"
+#include "scanners.h"
+#include "inlines.h"
+#include "html/houdini.h"
+#include "buffer.h"
+#include "debug.h"
+
+#define CODE_INDENT 4
+#define peek_at(i, n) (i)->data[n]
+
+static cmark_node* make_block(cmark_node_type tag, int start_line, int start_column)
+{
+	cmark_node* e;
+
+	e = (cmark_node *)calloc(1, sizeof(*e));
+	if(e != NULL) {
+		e->type = tag;
+		e->open = true;
+		e->start_line = start_line;
+		e->start_column = start_column;
+		e->end_line = start_line;
+		strbuf_init(&e->string_content, 32);
+	}
+
+	return e;
+}
+
+// Create a root document cmark_node.
+static cmark_node* make_document()
+{
+	cmark_node *e = make_block(NODE_DOCUMENT, 1, 1);
+	return e;
+}
+
+cmark_doc_parser *cmark_new_doc_parser()
+{
+	cmark_doc_parser *parser = (cmark_doc_parser*)malloc(sizeof(cmark_doc_parser));
+	cmark_node *document = make_document();
+	strbuf *line = (strbuf*)malloc(sizeof(strbuf));
+	cmark_strbuf_init(line, 256);
+
+	parser->refmap = reference_map_new();
+	parser->root = document;
+	parser->current = document;
+	parser->line_number = 0;
+	parser->curline = line;
+
+	return parser;
+}
+
+void cmark_free_doc_parser(cmark_doc_parser *parser)
+{
+	cmark_strbuf_free(parser->curline);
+	free(parser->curline);
+	cmark_reference_map_free(parser->refmap);
+	free(parser);
+}
+
+static void finalize(cmark_doc_parser *parser, cmark_node* b, int line_number);
+
+// Returns true if line has only space characters, else false.
+static bool is_blank(strbuf *s, int offset)
+{
+	while (offset < s->size) {
+		switch (s->ptr[offset]) {
+			case '\n':
+				return true;
+			case ' ':
+				offset++;
+				break;
+			default:
+				return false;
+		}
+	}
+
+	return true;
+}
+
+static inline bool can_contain(cmark_node_type parent_type, cmark_node_type child_type)
+{
+	return ( parent_type == NODE_DOCUMENT ||
+			parent_type == NODE_BLOCK_QUOTE ||
+			parent_type == NODE_LIST_ITEM ||
+			(parent_type == NODE_LIST && child_type == NODE_LIST_ITEM) );
+}
+
+static inline bool accepts_lines(cmark_node_type block_type)
+{
+	return (block_type == NODE_PARAGRAPH ||
+			block_type == NODE_ATX_HEADER ||
+			block_type == NODE_INDENTED_CODE ||
+			block_type == NODE_FENCED_CODE);
+}
+
+static void add_line(cmark_node* cmark_node, chunk *ch, int offset)
+{
+	assert(cmark_node->open);
+	strbuf_put(&cmark_node->string_content, ch->data + offset, ch->len - offset);
+}
+
+static void remove_trailing_blank_lines(strbuf *ln)
+{
+	int i;
+
+	for (i = ln->size - 1; i >= 0; --i) {
+		unsigned char c = ln->ptr[i];
+
+		if (c != ' ' && c != '\t' && c != '\r' && c != '\n')
+			break;
+	}
+
+	if (i < 0) {
+		strbuf_clear(ln);
+		return;
+	}
+
+	i = strbuf_strchr(ln, '\n', i);
+	if (i >= 0)
+		strbuf_truncate(ln, i);
+}
+
+// Check to see if a cmark_node ends with a blank line, descending
+// if needed into lists and sublists.
+static bool ends_with_blank_line(cmark_node* cmark_node)
+{
+	if (cmark_node->last_line_blank) {
+		return true;
+	}
+	if ((cmark_node->type == NODE_LIST || cmark_node->type == NODE_LIST_ITEM) && cmark_node->last_child) {
+		return ends_with_blank_line(cmark_node->last_child);
+	} else {
+		return false;
+	}
+}
+
+// Break out of all containing lists
+static int break_out_of_lists(cmark_doc_parser *parser, cmark_node ** bptr, int line_number)
+{
+	cmark_node *container = *bptr;
+	cmark_node *b = parser->root;
+	// find first containing NODE_LIST:
+	while (b && b->type != NODE_LIST) {
+		b = b->last_child;
+	}
+	if (b) {
+		while (container && container != b) {
+			finalize(parser, container, line_number);
+			container = container->parent;
+		}
+		finalize(parser, b, line_number);
+		*bptr = b->parent;
+	}
+	return 0;
+}
+
+
+static void finalize(cmark_doc_parser *parser, cmark_node* b, int line_number)
+{
+	int firstlinelen;
+	int pos;
+	cmark_node* item;
+	cmark_node* subitem;
+
+	if (!b->open)
+		return; // don't do anything if the cmark_node is already closed
+
+	b->open = false;
+	if (line_number > b->start_line) {
+		b->end_line = line_number - 1;
+	} else {
+		b->end_line = line_number;
+	}
+
+	switch (b->type) {
+		case NODE_PARAGRAPH:
+			pos = 0;
+			while (strbuf_at(&b->string_content, 0) == '[' &&
+					(pos = parse_reference_inline(&b->string_content, parser->refmap))) {
+
+				strbuf_drop(&b->string_content, pos);
+			}
+			if (is_blank(&b->string_content, 0)) {
+				b->type = NODE_REFERENCE_DEF;
+			}
+			break;
+
+		case NODE_INDENTED_CODE:
+			remove_trailing_blank_lines(&b->string_content);
+			strbuf_putc(&b->string_content, '\n');
+			break;
+
+		case NODE_FENCED_CODE:
+			// first line of contents becomes info
+			firstlinelen = strbuf_strchr(&b->string_content, '\n', 0);
+
+			strbuf_init(&b->as.code.info, 0);
+			houdini_unescape_html_f(
+					&b->as.code.info,
+					b->string_content.ptr,
+					firstlinelen
+					);
+
+			strbuf_drop(&b->string_content, firstlinelen + 1);
+
+			strbuf_trim(&b->as.code.info);
+			strbuf_unescape(&b->as.code.info);
+			break;
+
+		case NODE_LIST: // determine tight/loose status
+			b->as.list.tight = true; // tight by default
+			item = b->first_child;
+
+			while (item) {
+				// check for non-final non-empty list item ending with blank line:
+				if (item->last_line_blank && item->next) {
+					b->as.list.tight = false;
+					break;
+				}
+				// recurse into children of list item, to see if there are
+				// spaces between them:
+				subitem = item->first_child;
+				while (subitem) {
+					if (ends_with_blank_line(subitem) &&
+							(item->next || subitem->next)) {
+						b->as.list.tight = false;
+						break;
+					}
+					subitem = subitem->next;
+				}
+				if (!(b->as.list.tight)) {
+					break;
+				}
+				item = item->next;
+			}
+
+			break;
+
+		default:
+			break;
+	}
+}
+
+// Add a cmark_node as child of another.  Return pointer to child.
+static cmark_node* add_child(cmark_doc_parser *parser, cmark_node* parent,
+		cmark_node_type block_type, int start_line, int start_column)
+{
+	assert(parent);
+
+	// if 'parent' isn't the kind of cmark_node that can accept this child,
+	// then back up til we hit a cmark_node that can.
+	while (!can_contain(parent->type, block_type)) {
+		finalize(parser, parent, start_line);
+		parent = parent->parent;
+	}
+
+	cmark_node* child = make_block(block_type, start_line, start_column);
+	child->parent = parent;
+
+	if (parent->last_child) {
+		parent->last_child->next = child;
+		child->prev = parent->last_child;
+	} else {
+		parent->first_child = child;
+		child->prev = NULL;
+	}
+	parent->last_child = child;
+	return child;
+}
+
+
+typedef struct BlockStack {
+	struct BlockStack *previous;
+	cmark_node *next_sibling;
+} block_stack;
+
+// Walk through cmark_node and all children, recursively, parsing
+// string content into inline content where appropriate.
+static void process_inlines(cmark_node* cur, reference_map *refmap)
+{
+	block_stack* stack = NULL;
+	block_stack* newstack = NULL;
+
+	while (cur != NULL) {
+		switch (cur->type) {
+			case NODE_PARAGRAPH:
+			case NODE_ATX_HEADER:
+			case NODE_SETEXT_HEADER:
+				parse_inlines(cur, refmap);
+				break;
+
+			default:
+				break;
+		}
+
+		if (cur->first_child) {
+			newstack = (block_stack*)malloc(sizeof(block_stack));
+			if (newstack == NULL) return;
+			newstack->previous = stack;
+			stack = newstack;
+			stack->next_sibling = cur->next;
+			cur = cur->first_child;
+		} else {
+			cur = cur->next;
+		}
+
+		while (cur == NULL && stack != NULL) {
+			cur = stack->next_sibling;
+			newstack = stack->previous;
+			free(stack);
+			stack = newstack;
+		}
+	}
+	while (stack != NULL) {
+		newstack = stack->previous;
+		free(stack);
+		stack = newstack;
+	}
+}
+
+// Attempts to parse a list item marker (bullet or enumerated).
+// On success, returns length of the marker, and populates
+// data with the details.  On failure, returns 0.
+static int parse_list_marker(chunk *input, int pos, cmark_list **dataptr)
+{
+	unsigned char c;
+	int startpos;
+	cmark_list *data;
+
+	startpos = pos;
+	c = peek_at(input, pos);
+
+	if ((c == '*' || c == '-' || c == '+') && !scan_hrule(input, pos)) {
+		pos++;
+		if (!isspace(peek_at(input, pos))) {
+			return 0;
+		}
+		data = (cmark_list *)calloc(1, sizeof(*data));
+		if(data == NULL) {
+			return 0;
+		} else {
+			data->marker_offset = 0; // will be adjusted later
+			data->list_type = CMARK_BULLET_LIST;
+			data->bullet_char = c;
+			data->start = 1;
+			data->delimiter = CMARK_PERIOD_DELIM;
+			data->tight = false;
+		}
+	} else if (isdigit(c)) {
+		int start = 0;
+
+		do {
+			start = (10 * start) + (peek_at(input, pos) - '0');
+			pos++;
+		} while (isdigit(peek_at(input, pos)));
+
+		c = peek_at(input, pos);
+		if (c == '.' || c == ')') {
+			pos++;
+			if (!isspace(peek_at(input, pos))) {
+				return 0;
+			}
+			data = (cmark_list *)calloc(1, sizeof(*data));
+			if(data == NULL) {
+				return 0;
+			} else {
+				data->marker_offset = 0; // will be adjusted later
+				data->list_type = CMARK_ORDERED_LIST;
+				data->bullet_char = 0;
+				data->start = start;
+				data->delimiter = (c == '.' ? CMARK_PERIOD_DELIM : CMARK_PAREN_DELIM);
+				data->tight = false;
+			}
+		} else {
+			return 0;
+		}
+
+	} else {
+		return 0;
+	}
+
+	*dataptr = data;
+	return (pos - startpos);
+}
+
+// Return 1 if list item belongs in list, else 0.
+static int lists_match(cmark_list *list_data, cmark_list *item_data)
+{
+	return (list_data->list_type == item_data->list_type &&
+			list_data->delimiter == item_data->delimiter &&
+			// list_data->marker_offset == item_data.marker_offset &&
+			list_data->bullet_char == item_data->bullet_char);
+}
+
+static cmark_node *finalize_document(cmark_doc_parser *parser)
+{
+	while (parser->current != parser->root) {
+		finalize(parser, parser->current, parser->line_number);
+		parser->current = parser->current->parent;
+	}
+
+	finalize(parser, parser->root, parser->line_number);
+	process_inlines(parser->root, parser->refmap);
+
+	return parser->root;
+}
+
+extern cmark_node *cmark_parse_file(FILE *f)
+{
+	char buffer[4096];
+	cmark_doc_parser *parser = cmark_new_doc_parser();
+	size_t offset;
+	cmark_node *document;
+
+	while (fgets(buffer, sizeof(buffer), f)) {
+		offset = strlen(buffer);
+		cmark_process_line(parser, buffer, offset);
+	}
+
+	document = cmark_finish(parser);
+	cmark_free_doc_parser(parser);
+	return document;
+}
+
+extern cmark_node *cmark_parse_document(const char *buffer, size_t len)
+{
+	int linenum = 1;
+	const char *end = buffer + len;
+	size_t offset;
+	cmark_doc_parser *parser = cmark_new_doc_parser();
+	cmark_node *document;
+
+	while (buffer < end) {
+		const char *eol = memchr(buffer, '\n', end - buffer);
+		offset = eol ? (eol - buffer) + 1 : end - buffer;
+		cmark_process_line(parser, buffer, offset);
+		buffer += offset;
+		linenum++;
+	}
+
+	document = cmark_finish(parser);
+	cmark_free_doc_parser(parser);
+	return document;
+}
+
+static void chop_trailing_hashtags(chunk *ch)
+{
+	int n, orig_n;
+
+	chunk_rtrim(ch);
+	orig_n = n = ch->len - 1;
+
+	// if string ends in space followed by #s, remove these:
+	while (n >= 0 && peek_at(ch, n) == '#')
+		n--;
+
+	// Check for a be a space before the final #s:
+	if (n != orig_n && n >= 0 && peek_at(ch, n) == ' ') {
+		ch->len = n;
+		chunk_rtrim(ch);
+	}
+}
+
+void cmark_process_line(cmark_doc_parser *parser, const char *buffer,
+		 size_t bytes)
+{
+	cmark_node* last_matched_container;
+	int offset = 0;
+	int matched = 0;
+	int lev = 0;
+	int i;
+	cmark_list *data = NULL;
+	bool all_matched = true;
+	cmark_node* container;
+	cmark_node* cur = parser->current;
+	bool blank = false;
+	int first_nonspace;
+	int indent;
+	chunk input;
+
+	utf8proc_detab(parser->curline, (unsigned char *)buffer, bytes);
+
+	// Add a newline to the end if not present:
+	// TODO this breaks abstraction:
+	if (parser->curline->ptr[parser->curline->size - 1] != '\n') {
+		strbuf_putc(parser->curline, '\n');
+	}
+	input.data = parser->curline->ptr;
+	input.len = parser->curline->size;
+
+	// container starts at the document root.
+	container = parser->root;
+
+	parser->line_number++;
+
+	// for each containing cmark_node, try to parse the associated line start.
+	// bail out on failure:  container will point to the last matching cmark_node.
+
+	while (container->last_child && container->last_child->open) {
+		container = container->last_child;
+
+		first_nonspace = offset;
+		while (peek_at(&input, first_nonspace) == ' ') {
+			first_nonspace++;
+		}
+
+		indent = first_nonspace - offset;
+		blank = peek_at(&input, first_nonspace) == '\n';
+
+		if (container->type == NODE_BLOCK_QUOTE) {
+			matched = indent <= 3 && peek_at(&input, first_nonspace) == '>';
+			if (matched) {
+				offset = first_nonspace + 1;
+				if (peek_at(&input, offset) == ' ')
+					offset++;
+			} else {
+				all_matched = false;
+			}
+
+		} else if (container->type == NODE_LIST_ITEM) {
+
+			if (indent >= container->as.list.marker_offset +
+					container->as.list.padding) {
+				offset += container->as.list.marker_offset +
+					container->as.list.padding;
+			} else if (blank) {
+				offset = first_nonspace;
+			} else {
+				all_matched = false;
+			}
+
+		} else if (container->type == NODE_INDENTED_CODE) {
+
+			if (indent >= CODE_INDENT) {
+				offset += CODE_INDENT;
+			} else if (blank) {
+				offset = first_nonspace;
+			} else {
+				all_matched = false;
+			}
+
+		} else if (container->type == NODE_ATX_HEADER ||
+				container->type == NODE_SETEXT_HEADER) {
+
+			// a header can never contain more than one line
+			all_matched = false;
+			if (blank) {
+				container->last_line_blank = true;
+			}
+
+		} else if (container->type == NODE_FENCED_CODE) {
+
+			// skip optional spaces of fence offset
+			i = container->as.code.fence_offset;
+			while (i > 0 && peek_at(&input, offset) == ' ') {
+				offset++;
+				i--;
+			}
+
+		} else if (container->type == NODE_HTML) {
+
+			if (blank) {
+				container->last_line_blank = true;
+				all_matched = false;
+			}
+
+		} else if (container->type == NODE_PARAGRAPH) {
+
+			if (blank) {
+				container->last_line_blank = true;
+				all_matched = false;
+			}
+
+		}
+
+		if (!all_matched) {
+			container = container->parent;  // back up to last matching cmark_node
+			break;
+		}
+	}
+
+	last_matched_container = container;
+
+	// check to see if we've hit 2nd blank line, break out of list:
+	if (blank && container->last_line_blank) {
+		break_out_of_lists(parser, &container, parser->line_number);
+	}
+
+	// unless last matched container is code cmark_node, try new container starts:
+	while (container->type != NODE_FENCED_CODE && container->type != NODE_INDENTED_CODE &&
+			container->type != NODE_HTML) {
+
+		first_nonspace = offset;
+		while (peek_at(&input, first_nonspace) == ' ')
+			first_nonspace++;
+
+		indent = first_nonspace - offset;
+		blank = peek_at(&input, first_nonspace) == '\n';
+
+		if (indent >= CODE_INDENT) {
+			if (cur->type != NODE_PARAGRAPH && !blank) {
+				offset += CODE_INDENT;
+				container = add_child(parser, container, NODE_INDENTED_CODE, parser->line_number, offset + 1);
+			} else { // indent > 4 in lazy line
+				break;
+			}
+
+		} else if (peek_at(&input, first_nonspace) == '>') {
+
+			offset = first_nonspace + 1;
+			// optional following character
+			if (peek_at(&input, offset) == ' ')
+				offset++;
+			container = add_child(parser, container, NODE_BLOCK_QUOTE, parser->line_number, offset + 1);
+
+		} else if ((matched = scan_atx_header_start(&input, first_nonspace))) {
+
+			offset = first_nonspace + matched;
+			container = add_child(parser, container, NODE_ATX_HEADER, parser->line_number, offset + 1);
+
+			int hashpos = chunk_strchr(&input, '#', first_nonspace);
+			int level = 0;
+
+			while (peek_at(&input, hashpos) == '#') {
+				level++;
+				hashpos++;
+			}
+			container->as.header.level = level;
+
+		} else if ((matched = scan_open_code_fence(&input, first_nonspace))) {
+
+			container = add_child(parser, container, NODE_FENCED_CODE, parser->line_number, first_nonspace + 1);
+			container->as.code.fence_char = peek_at(&input, first_nonspace);
+			container->as.code.fence_length = matched;
+			container->as.code.fence_offset = first_nonspace - offset;
+			offset = first_nonspace + matched;
+
+		} else if ((matched = scan_html_block_tag(&input, first_nonspace))) {
+
+			container = add_child(parser, container, NODE_HTML, parser->line_number, first_nonspace + 1);
+			// note, we don't adjust offset because the tag is part of the text
+
+		} else if (container->type == NODE_PARAGRAPH &&
+				(lev = scan_setext_header_line(&input, first_nonspace)) &&
+				// check that there is only one line in the paragraph:
+				strbuf_strrchr(&container->string_content, '\n',
+					strbuf_len(&container->string_content) - 2) < 0) {
+
+			container->type = NODE_SETEXT_HEADER;
+			container->as.header.level = lev;
+			offset = input.len - 1;
+
+		} else if (!(container->type == NODE_PARAGRAPH && !all_matched) &&
+				(matched = scan_hrule(&input, first_nonspace))) {
+
+			// it's only now that we know the line is not part of a setext header:
+			container = add_child(parser, container, NODE_HRULE, parser->line_number, first_nonspace + 1);
+			finalize(parser, container, parser->line_number);
+			container = container->parent;
+			offset = input.len - 1;
+
+		} else if ((matched = parse_list_marker(&input, first_nonspace, &data))) {
+
+			// compute padding:
+			offset = first_nonspace + matched;
+			i = 0;
+			while (i <= 5 && peek_at(&input, offset + i) == ' ') {
+				i++;
+			}
+			// i = number of spaces after marker, up to 5
+			if (i >= 5 || i < 1 || peek_at(&input, offset) == '\n') {
+				data->padding = matched + 1;
+				if (i > 0) {
+					offset += 1;
+				}
+			} else {
+				data->padding = matched + i;
+				offset += i;
+			}
+
+			// check container; if it's a list, see if this list item
+			// can continue the list; otherwise, create a list container.
+
+			data->marker_offset = indent;
+
+			if (container->type != NODE_LIST ||
+					!lists_match(&container->as.list, data)) {
+				container = add_child(parser, container, NODE_LIST, parser->line_number,
+						first_nonspace + 1);
+
+				memcpy(&container->as.list, data, sizeof(*data));
+			}
+
+			// add the list item
+			container = add_child(parser, container, NODE_LIST_ITEM, parser->line_number,
+					first_nonspace + 1);
+			/* TODO: static */
+			memcpy(&container->as.list, data, sizeof(*data));
+			free(data);
+		} else {
+			break;
+		}
+
+		if (accepts_lines(container->type)) {
+			// if it's a line container, it can't contain other containers
+			break;
+		}
+	}
+
+	// what remains at offset is a text line.  add the text to the
+	// appropriate container.
+
+	first_nonspace = offset;
+	while (peek_at(&input, first_nonspace) == ' ')
+		first_nonspace++;
+
+	indent = first_nonspace - offset;
+	blank = peek_at(&input, first_nonspace) == '\n';
+
+	// cmark_node quote lines are never blank as they start with >
+	// and we don't count blanks in fenced code for purposes of tight/loose
+	// lists or breaking out of lists.  we also don't set last_line_blank
+	// on an empty list item.
+	container->last_line_blank = (blank &&
+			container->type != NODE_BLOCK_QUOTE &&
+			container->type != NODE_SETEXT_HEADER &&
+			container->type != NODE_FENCED_CODE &&
+			!(container->type == NODE_LIST_ITEM &&
+				container->first_child == NULL &&
+				container->start_line == parser->line_number));
+
+	cmark_node *cont = container;
+	while (cont->parent) {
+		cont->parent->last_line_blank = false;
+		cont = cont->parent;
+	}
+
+	if (cur != last_matched_container &&
+			container == last_matched_container &&
+			!blank &&
+			cur->type == NODE_PARAGRAPH &&
+			strbuf_len(&cur->string_content) > 0) {
+
+		add_line(cur, &input, offset);
+
+	} else { // not a lazy continuation
+
+		// finalize any blocks that were not matched and set cur to container:
+		while (cur != last_matched_container) {
+			finalize(parser, cur, parser->line_number);
+			cur = cur->parent;
+			assert(cur != NULL);
+		}
+
+		if (container->type == NODE_INDENTED_CODE) {
+
+			add_line(container, &input, offset);
+
+		} else if (container->type == NODE_FENCED_CODE) {
+			matched = 0;
+
+			if (indent <= 3 &&
+					peek_at(&input, first_nonspace) == container->as.code.fence_char) {
+				int fence_len = scan_close_code_fence(&input, first_nonspace);
+				if (fence_len > container->as.code.fence_length)
+					matched = 1;
+			}
+
+			if (matched) {
+				// if closing fence, don't add line to container; instead, close it:
+				finalize(parser, container, parser->line_number);
+				container = container->parent; // back up to parent
+			} else {
+				add_line(container, &input, offset);
+			}
+
+		} else if (container->type == NODE_HTML) {
+
+			add_line(container, &input, offset);
+
+		} else if (blank) {
+
+			// ??? do nothing
+
+		} else if (container->type == NODE_ATX_HEADER) {
+
+			chop_trailing_hashtags(&input);
+			add_line(container, &input, first_nonspace);
+			finalize(parser, container, parser->line_number);
+			container = container->parent;
+
+		} else if (accepts_lines(container->type)) {
+
+			add_line(container, &input, first_nonspace);
+
+		} else if (container->type != NODE_HRULE && container->type != NODE_SETEXT_HEADER) {
+
+			// create paragraph container for line
+			container = add_child(parser, container, NODE_PARAGRAPH, parser->line_number, first_nonspace + 1);
+			add_line(container, &input, first_nonspace);
+
+		} else {
+			assert(false);
+		}
+
+		parser->current = container;
+	}
+	strbuf_clear(parser->curline);
+
+}
+
+cmark_node *cmark_finish(cmark_doc_parser *parser)
+{
+	finalize_document(parser);
+	strbuf_free(parser->curline);
+#if CMARK_DEBUG_NODES
+	if (cmark_node_check(parser->root, stderr)) {
+		abort();
+	}
+#endif
+	return parser->root;
+}
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/buffer.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/buffer.c b/compiler/modules/CommonMark/src/buffer.c
new file mode 100644
index 0000000..45b6984
--- /dev/null
+++ b/compiler/modules/CommonMark/src/buffer.c
@@ -0,0 +1,375 @@
+#include <stdarg.h>
+#include <ctype.h>
+#include <string.h>
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "buffer.h"
+
+/* Used as default value for strbuf->ptr so that people can always
+ * assume ptr is non-NULL and zero terminated even for new strbufs.
+ */
+unsigned char cmark_strbuf__initbuf[1];
+unsigned char cmark_strbuf__oom[1];
+
+#define ENSURE_SIZE(b, d)					\
+	if ((d) > buf->asize && strbuf_grow(b, (d)) < 0)	\
+		return -1;
+
+#ifndef MIN
+#define MIN(x,y)  ((x<y) ? x : y)
+#endif
+
+void cmark_strbuf_init(strbuf *buf, int initial_size)
+{
+	buf->asize = 0;
+	buf->size = 0;
+	buf->ptr = cmark_strbuf__initbuf;
+
+	if (initial_size)
+		cmark_strbuf_grow(buf, initial_size);
+}
+
+int cmark_strbuf_try_grow(strbuf *buf, int target_size, bool mark_oom)
+{
+	unsigned char *new_ptr;
+	int new_size;
+
+	if (buf->ptr == cmark_strbuf__oom)
+		return -1;
+
+	if (target_size <= buf->asize)
+		return 0;
+
+	if (buf->asize == 0) {
+		new_size = target_size;
+		new_ptr = NULL;
+	} else {
+		new_size = buf->asize;
+		new_ptr = buf->ptr;
+	}
+
+	/* grow the buffer size by 1.5, until it's big enough
+	 * to fit our target size */
+	while (new_size < target_size)
+		new_size = (new_size << 1) - (new_size >> 1);
+
+	/* round allocation up to multiple of 8 */
+	new_size = (new_size + 7) & ~7;
+
+	new_ptr = (unsigned char *)realloc(new_ptr, new_size);
+
+	if (!new_ptr) {
+		if (mark_oom)
+			buf->ptr = cmark_strbuf__oom;
+		return -1;
+	}
+
+	buf->asize = new_size;
+	buf->ptr   = new_ptr;
+
+	/* truncate the existing buffer size if necessary */
+	if (buf->size >= buf->asize)
+		buf->size = buf->asize - 1;
+	buf->ptr[buf->size] = '\0';
+
+	return 0;
+}
+
+int cmark_strbuf_grow(cmark_strbuf *buf, int target_size)
+{
+	return cmark_strbuf_try_grow(buf, target_size, true);
+}
+
+bool cmark_strbuf_oom(const cmark_strbuf *buf)
+{
+	return (buf->ptr == cmark_strbuf__oom);
+}
+
+size_t cmark_strbuf_len(const cmark_strbuf *buf)
+{
+	return buf->size;
+}
+
+void cmark_strbuf_free(strbuf *buf)
+{
+	if (!buf) return;
+
+	if (buf->ptr != cmark_strbuf__initbuf && buf->ptr != cmark_strbuf__oom)
+		free(buf->ptr);
+
+	cmark_strbuf_init(buf, 0);
+}
+
+void cmark_strbuf_clear(strbuf *buf)
+{
+	buf->size = 0;
+
+	if (buf->asize > 0)
+		buf->ptr[0] = '\0';
+}
+
+int cmark_strbuf_set(strbuf *buf, const unsigned char *data, int len)
+{
+	if (len <= 0 || data == NULL) {
+		cmark_strbuf_clear(buf);
+	} else {
+		if (data != buf->ptr) {
+			ENSURE_SIZE(buf, len + 1);
+			memmove(buf->ptr, data, len);
+		}
+		buf->size = len;
+		buf->ptr[buf->size] = '\0';
+	}
+	return 0;
+}
+
+int cmark_strbuf_sets(strbuf *buf, const char *string)
+{
+	return cmark_strbuf_set(buf,
+			  (const unsigned char *)string,
+			  string ? strlen(string) : 0);
+}
+
+int cmark_strbuf_putc(strbuf *buf, int c)
+{
+	ENSURE_SIZE(buf, buf->size + 2);
+	buf->ptr[buf->size++] = c;
+	buf->ptr[buf->size] = '\0';
+	return 0;
+}
+
+int cmark_strbuf_put(strbuf *buf, const unsigned char *data, int len)
+{
+	if (len <= 0)
+		return 0;
+
+	ENSURE_SIZE(buf, buf->size + len + 1);
+	memmove(buf->ptr + buf->size, data, len);
+	buf->size += len;
+	buf->ptr[buf->size] = '\0';
+	return 0;
+}
+
+int cmark_strbuf_puts(strbuf *buf, const char *string)
+{
+	return cmark_strbuf_put(buf, (const unsigned char *)string, strlen(string));
+}
+
+int cmark_strbuf_vprintf(strbuf *buf, const char *format, va_list ap)
+{
+	const int expected_size = buf->size + (strlen(format) * 2);
+	int len;
+
+	ENSURE_SIZE(buf, expected_size);
+
+	while (1) {
+		len = vsnprintf(
+			(char *)buf->ptr + buf->size,
+			buf->asize - buf->size,
+			format, ap
+			);
+
+		if (len < 0) {
+			free(buf->ptr);
+			buf->ptr = cmark_strbuf__oom;
+			return -1;
+		}
+
+		if (len + 1 <= buf->asize - buf->size) {
+			buf->size += len;
+			break;
+		}
+
+		ENSURE_SIZE(buf, buf->size + len + 1);
+	}
+
+	return 0;
+}
+
+int cmark_strbuf_printf(strbuf *buf, const char *format, ...)
+{
+	int r;
+	va_list ap;
+
+	va_start(ap, format);
+	r = cmark_strbuf_vprintf(buf, format, ap);
+	va_end(ap);
+
+	return r;
+}
+
+void cmark_strbuf_copy_cstr(char *data, int datasize, const strbuf *buf)
+{
+	int copylen;
+
+	assert(data && datasize && buf);
+
+	data[0] = '\0';
+
+	if (buf->size == 0 || buf->asize <= 0)
+		return;
+
+	copylen = buf->size;
+	if (copylen > datasize - 1)
+		copylen = datasize - 1;
+	memmove(data, buf->ptr, copylen);
+	data[copylen] = '\0';
+}
+
+void cmark_strbuf_swap(strbuf *buf_a, strbuf *buf_b)
+{
+	strbuf t = *buf_a;
+	*buf_a = *buf_b;
+	*buf_b = t;
+}
+
+unsigned char *cmark_strbuf_detach(strbuf *buf)
+{
+	unsigned char *data = buf->ptr;
+
+	if (buf->asize == 0 || buf->ptr == cmark_strbuf__oom) {
+		/* return an empty string */
+		return (unsigned char *)calloc(1, 1);
+	}
+
+	cmark_strbuf_init(buf, 0);
+	return data;
+}
+
+void cmark_strbuf_attach(strbuf *buf, unsigned char *ptr, int asize)
+{
+	cmark_strbuf_free(buf);
+
+	if (ptr) {
+		buf->ptr = ptr;
+		buf->size = strlen((char *)ptr);
+		if (asize)
+			buf->asize = (asize < buf->size) ? buf->size + 1 : asize;
+		else /* pass 0 to fall back on strlen + 1 */
+			buf->asize = buf->size + 1;
+	} else {
+		cmark_strbuf_grow(buf, asize);
+	}
+}
+
+int cmark_strbuf_cmp(const strbuf *a, const strbuf *b)
+{
+	int result = memcmp(a->ptr, b->ptr, MIN(a->size, b->size));
+	return (result != 0) ? result :
+		(a->size < b->size) ? -1 : (a->size > b->size) ? 1 : 0;
+}
+
+int cmark_strbuf_strchr(const strbuf *buf, int c, int pos)
+{
+	const unsigned char *p = (unsigned char *)memchr(buf->ptr + pos, c, buf->size - pos);
+	if (!p)
+		return -1;
+
+	return (int)(p - (const unsigned char *)buf->ptr);
+}
+
+int cmark_strbuf_strrchr(const strbuf *buf, int c, int pos)
+{
+	int i;
+
+	for (i = pos; i >= 0; i--) {
+		if (buf->ptr[i] == (unsigned char) c)
+			return i;
+	}
+
+	return -1;
+}
+
+void cmark_strbuf_truncate(strbuf *buf, int len)
+{
+	if (len < buf->size) {
+		buf->size = len;
+		buf->ptr[buf->size] = '\0';
+	}
+}
+
+void cmark_strbuf_drop(strbuf *buf, int n)
+{
+	if (n > 0) {
+		buf->size = buf->size - n;
+		if (buf->size)
+			memmove(buf->ptr, buf->ptr + n, buf->size);
+
+		buf->ptr[buf->size] = '\0';
+	}
+}
+
+void cmark_strbuf_rtrim(strbuf *buf)
+{
+	if (!buf->size)
+		return;
+
+	while (buf->size > 0) {
+		if (!isspace(buf->ptr[buf->size - 1]))
+			break;
+
+		buf->size--;
+	}
+
+	buf->ptr[buf->size] = '\0';
+}
+
+void cmark_strbuf_trim(strbuf *buf)
+{
+	int i = 0;
+
+	if (!buf->size)
+		return;
+
+	while (i < buf->size && isspace(buf->ptr[i]))
+		i++;
+
+	cmark_strbuf_drop(buf, i);
+
+	cmark_strbuf_rtrim(buf);
+}
+
+// Destructively modify string, collapsing consecutive
+// space and newline characters into a single space.
+void cmark_strbuf_normalize_whitespace(strbuf *s)
+{
+	bool last_char_was_space = false;
+	int r, w;
+
+	for (r = 0, w = 0; r < s->size; ++r) {
+		switch (s->ptr[r]) {
+		case ' ':
+		case '\n':
+			if (last_char_was_space)
+				break;
+
+			s->ptr[w++] = ' ';
+			last_char_was_space = true;
+			break;
+
+		default:
+			s->ptr[w++] = s->ptr[r];
+			last_char_was_space = false;
+		}
+	}
+
+	cmark_strbuf_truncate(s, w);
+}
+
+// Destructively unescape a string: remove backslashes before punctuation chars.
+extern void cmark_strbuf_unescape(strbuf *buf)
+{
+	int r, w;
+
+	for (r = 0, w = 0; r < buf->size; ++r) {
+		if (buf->ptr[r] == '\\' && ispunct(buf->ptr[r + 1]))
+			continue;
+
+		buf->ptr[w++] = buf->ptr[r];
+	}
+
+	cmark_strbuf_truncate(buf, w);
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/buffer.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/buffer.h b/compiler/modules/CommonMark/src/buffer.h
new file mode 100644
index 0000000..be888e1
--- /dev/null
+++ b/compiler/modules/CommonMark/src/buffer.h
@@ -0,0 +1,178 @@
+#ifndef CMARK_BUFFER_H
+#define CMARK_BUFFER_H
+
+#include <stddef.h>
+#include <stdarg.h>
+#include "config.h"
+#include "cmark_export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+	unsigned char *ptr;
+	int asize, size;
+} cmark_strbuf;
+
+CMARK_EXPORT
+extern unsigned char cmark_strbuf__initbuf[];
+
+CMARK_EXPORT
+extern unsigned char cmark_strbuf__oom[];
+
+#define CMARK_GH_BUF_INIT { cmark_strbuf__initbuf, 0, 0 }
+
+/**
+ * Initialize a strbuf structure.
+ *
+ * For the cases where GH_BUF_INIT cannot be used to do static
+ * initialization.
+ */
+CMARK_EXPORT
+void cmark_strbuf_init(cmark_strbuf *buf, int initial_size);
+
+/**
+ * Attempt to grow the buffer to hold at least `target_size` bytes.
+ *
+ * If the allocation fails, this will return an error.  If mark_oom is true,
+ * this will mark the buffer as invalid for future operations; if false,
+ * existing buffer content will be preserved, but calling code must handle
+ * that buffer was not expanded.
+ */
+CMARK_EXPORT
+int cmark_strbuf_try_grow(cmark_strbuf *buf, int target_size, bool mark_oom);
+
+/**
+ * Grow the buffer to hold at least `target_size` bytes.
+ *
+ * If the allocation fails, this will return an error and the buffer will be
+ * marked as invalid for future operations, invaliding contents.
+ *
+ * @return 0 on success or -1 on failure
+ */
+CMARK_EXPORT
+int cmark_strbuf_grow(cmark_strbuf *buf, int target_size);
+
+CMARK_EXPORT
+void cmark_strbuf_free(cmark_strbuf *buf);
+CMARK_EXPORT
+void cmark_strbuf_swap(cmark_strbuf *buf_a, cmark_strbuf *buf_b);
+
+/**
+ * Test if there have been any reallocation failures with this strbuf.
+ *
+ * Any function that writes to a strbuf can fail due to memory allocation
+ * issues.  If one fails, the strbuf will be marked with an OOM error and
+ * further calls to modify the buffer will fail.  Check strbuf_oom() at the
+ * end of your sequence and it will be true if you ran out of memory at any
+ * point with that buffer.
+ *
+ * @return false if no error, true if allocation error
+ */
+CMARK_EXPORT
+bool cmark_strbuf_oom(const cmark_strbuf *buf);
+
+CMARK_EXPORT
+size_t cmark_strbuf_len(const cmark_strbuf *buf);
+
+CMARK_EXPORT
+int cmark_strbuf_cmp(const cmark_strbuf *a, const cmark_strbuf *b);
+
+CMARK_EXPORT
+void cmark_strbuf_attach(cmark_strbuf *buf, unsigned char *ptr, int asize);
+CMARK_EXPORT
+unsigned char *cmark_strbuf_detach(cmark_strbuf *buf);
+CMARK_EXPORT
+void cmark_strbuf_copy_cstr(char *data, int datasize, const cmark_strbuf *buf);
+
+static inline const char *cmark_strbuf_cstr(const cmark_strbuf *buf)
+{
+	return (char *)buf->ptr;
+}
+
+#define cmark_strbuf_at(buf, n) ((buf)->ptr[n])
+
+/*
+ * Functions below that return int value error codes will return 0 on
+ * success or -1 on failure (which generally means an allocation failed).
+ * Using a strbuf where the allocation has failed with result in -1 from
+ * all further calls using that buffer.  As a result, you can ignore the
+ * return code of these functions and call them in a series then just call
+ * strbuf_oom at the end.
+ */
+CMARK_EXPORT
+int cmark_strbuf_set(cmark_strbuf *buf, const unsigned char *data, int len);
+CMARK_EXPORT
+int cmark_strbuf_sets(cmark_strbuf *buf, const char *string);
+CMARK_EXPORT
+int cmark_strbuf_putc(cmark_strbuf *buf, int c);
+CMARK_EXPORT
+int cmark_strbuf_put(cmark_strbuf *buf, const unsigned char *data, int len);
+CMARK_EXPORT
+int cmark_strbuf_puts(cmark_strbuf *buf, const char *string);
+CMARK_EXPORT
+int cmark_strbuf_printf(cmark_strbuf *buf, const char *format, ...)
+	CMARK_ATTRIBUTE((format (printf, 2, 3)));
+CMARK_EXPORT
+int cmark_strbuf_vprintf(cmark_strbuf *buf, const char *format, va_list ap);
+CMARK_EXPORT
+void cmark_strbuf_clear(cmark_strbuf *buf);
+
+CMARK_EXPORT
+int cmark_strbuf_strchr(const cmark_strbuf *buf, int c, int pos);
+CMARK_EXPORT
+int cmark_strbuf_strrchr(const cmark_strbuf *buf, int c, int pos);
+CMARK_EXPORT
+void cmark_strbuf_drop(cmark_strbuf *buf, int n);
+CMARK_EXPORT
+void cmark_strbuf_truncate(cmark_strbuf *buf, int len);
+CMARK_EXPORT
+void cmark_strbuf_rtrim(cmark_strbuf *buf);
+CMARK_EXPORT
+void cmark_strbuf_trim(cmark_strbuf *buf);
+CMARK_EXPORT
+void cmark_strbuf_normalize_whitespace(cmark_strbuf *s);
+CMARK_EXPORT
+void cmark_strbuf_unescape(cmark_strbuf *s);
+
+#ifndef CMARK_NO_SHORT_NAMES
+  #define strbuf                        cmark_strbuf
+  #define strbuf__initbuf               cmark_strbuf__initbuf
+  #define strbuf__oom                   cmark_strbuf__oom
+  #define GH_BUF_INIT                   CMARK_GH_BUF_INIT
+  #define strbuf_init                   cmark_strbuf_init
+  #define strbuf_try_grow               cmark_strbuf_try_grow
+  #define strbuf_grow                   cmark_strbuf_grow
+  #define strbuf_free                   cmark_strbuf_free
+  #define strbuf_swap                   cmark_strbuf_swap
+  #define strbuf_oom                    cmark_strbuf_oom
+  #define strbuf_len                    cmark_strbuf_len
+  #define strbuf_cmp                    cmark_strbuf_cmp
+  #define strbuf_attach                 cmark_strbuf_attach
+  #define strbuf_detach                 cmark_strbuf_detach
+  #define strbuf_copy_cstr              cmark_strbuf_copy_cstr
+  #define strbuf_at                     cmark_strbuf_at
+  #define strbuf_set                    cmark_strbuf_set
+  #define strbuf_sets                   cmark_strbuf_sets
+  #define strbuf_putc                   cmark_strbuf_putc
+  #define strbuf_put                    cmark_strbuf_put
+  #define strbuf_puts                   cmark_strbuf_puts
+  #define strbuf_printf                 cmark_strbuf_printf
+  #define strbuf_vprintf                cmark_strbuf_vprintf
+  #define strbuf_clear                  cmark_strbuf_clear
+  #define strbuf_strchr                 cmark_strbuf_strchr
+  #define strbuf_strrchr                cmark_strbuf_strrchr
+  #define strbuf_drop                   cmark_strbuf_drop
+  #define strbuf_truncate               cmark_strbuf_truncate
+  #define strbuf_rtrim                  cmark_strbuf_rtrim
+  #define strbuf_trim                   cmark_strbuf_trim
+  #define strbuf_normalize_whitespace   cmark_strbuf_normalize_whitespace
+  #define strbuf_unescape               cmark_strbuf_unescape
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


[06/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/scanners.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/scanners.h b/compiler/modules/CommonMark/src/scanners.h
new file mode 100644
index 0000000..3269112
--- /dev/null
+++ b/compiler/modules/CommonMark/src/scanners.h
@@ -0,0 +1,38 @@
+#include "cmark.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset);
+int _scan_autolink_uri(const unsigned char *p);
+int _scan_autolink_email(const unsigned char *p);
+int _scan_html_tag(const unsigned char *p);
+int _scan_html_block_tag(const unsigned char *p);
+int _scan_link_url(const unsigned char *p);
+int _scan_link_title(const unsigned char *p);
+int _scan_spacechars(const unsigned char *p);
+int _scan_atx_header_start(const unsigned char *p);
+int _scan_setext_header_line(const unsigned char *p);
+int _scan_hrule(const unsigned char *p);
+int _scan_open_code_fence(const unsigned char *p);
+int _scan_close_code_fence(const unsigned char *p);
+int _scan_entity(const unsigned char *p);
+
+#define scan_autolink_uri(c, n) _scan_at(&_scan_autolink_uri, c, n)
+#define scan_autolink_email(c, n) _scan_at(&_scan_autolink_email, c, n)
+#define scan_html_tag(c, n) _scan_at(&_scan_html_tag, c, n)
+#define scan_html_block_tag(c, n) _scan_at(&_scan_html_block_tag, c, n)
+#define scan_link_url(c, n) _scan_at(&_scan_link_url, c, n)
+#define scan_link_title(c, n) _scan_at(&_scan_link_title, c, n)
+#define scan_spacechars(c, n) _scan_at(&_scan_spacechars, c, n)
+#define scan_atx_header_start(c, n) _scan_at(&_scan_atx_header_start, c, n)
+#define scan_setext_header_line(c, n) _scan_at(&_scan_setext_header_line, c, n)
+#define scan_hrule(c, n) _scan_at(&_scan_hrule, c, n)
+#define scan_open_code_fence(c, n) _scan_at(&_scan_open_code_fence, c, n)
+#define scan_close_code_fence(c, n) _scan_at(&_scan_close_code_fence, c, n)
+#define scan_entity(c, n) _scan_at(&_scan_entity, c, n)
+
+#ifdef __cplusplus
+}
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/scanners.re
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/scanners.re b/compiler/modules/CommonMark/src/scanners.re
new file mode 100644
index 0000000..5e74873
--- /dev/null
+++ b/compiler/modules/CommonMark/src/scanners.re
@@ -0,0 +1,235 @@
+#include <stdlib.h>
+#include "chunk.h"
+#include "scanners.h"
+
+int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset)
+{
+	int res;
+	unsigned char *ptr = (unsigned char *)c->data;
+	unsigned char lim = ptr[c->len];
+
+	ptr[c->len] = '\0';
+	res = scanner(ptr + offset);
+	ptr[c->len] = lim;
+
+	return res;
+}
+
+/*!re2c
+  re2c:define:YYCTYPE  = "unsigned char";
+  re2c:define:YYCURSOR = p;
+  re2c:define:YYMARKER = marker;
+  re2c:define:YYCTXMARKER = marker;
+  re2c:yyfill:enable = 0;
+
+  wordchar = [^\x00-\x20];
+
+  spacechar = [ \t\n];
+
+  reg_char     = [^\\()\x00-\x20];
+
+  escaped_char = [\\][!"#$%&'()*+,./:;<=>?@[\\\]^_`{|}~-];
+
+  tagname = [A-Za-z][A-Za-z0-9]*;
+
+  blocktagname = 'article'|'header'|'aside'|'hgroup'|'iframe'|'blockquote'|'hr'|'body'|'li'|'map'|'button'|'object'|'canvas'|'ol'|'caption'|'output'|'col'|'p'|'colgroup'|'pre'|'dd'|'progress'|'div'|'section'|'dl'|'table'|'td'|'dt'|'tbody'|'embed'|'textarea'|'fieldset'|'tfoot'|'figcaption'|'th'|'figure'|'thead'|'footer'|'footer'|'tr'|'form'|'ul'|'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'video'|'script'|'style';
+
+  attributename = [a-zA-Z_:][a-zA-Z0-9:._-]*;
+
+  unquotedvalue = [^\"'=<>`\x00]+;
+  singlequotedvalue = ['][^'\x00]*['];
+  doublequotedvalue = [\"][^\"\x00]*[\"];
+
+  attributevalue = unquotedvalue | singlequotedvalue | doublequotedvalue;
+
+  attributevaluespec = spacechar* [=] spacechar* attributevalue;
+
+  attribute = spacechar+ attributename attributevaluespec?;
+
+  opentag = tagname attribute* spacechar* [/]? [>];
+  closetag = [/] tagname spacechar* [>];
+
+  htmlcomment = "!--" ([^-\x00]+ | [-][^-\x00]+)* "-->";
+
+  processinginstruction = "?" ([^?>\x00]+ | [?][^>\x00] | [>])* "?>";
+
+  declaration = "!" [A-Z]+ spacechar+ [^>\x00]* ">";
+
+  cdata = "![CDATA[" ([^\]\x00]+ | "]" [^\]\x00] | "]]" [^>\x00])* "]]>";
+
+  htmltag = opentag | closetag | htmlcomment | processinginstruction |
+            declaration | cdata;
+
+  in_parens_nosp   = [(] (reg_char|escaped_char)* [)];
+
+  in_double_quotes = ["] (escaped_char|[^"\x00])* ["];
+  in_single_quotes = ['] (escaped_char|[^'\x00])* ['];
+  in_parens        = [(] (escaped_char|[^)\x00])* [)];
+
+  scheme = 'coap'|'doi'|'javascript'|'aaa'|'aaas'|'about'|'acap'|'cap'|'cid'|'crid'|'data'|'dav'|'dict'|'dns'|'file'|'ftp'|'geo'|'go'|'gopher'|'h323'|'http'|'https'|'iax'|'icap'|'im'|'imap'|'info'|'ipp'|'iris'|'iris.beep'|'iris.xpc'|'iris.xpcs'|'iris.lwz'|'ldap'|'mailto'|'mid'|'msrp'|'msrps'|'mtqp'|'mupdate'|'news'|'nfs'|'ni'|'nih'|'nntp'|'opaquelocktoken'|'pop'|'pres'|'rtsp'|'service'|'session'|'shttp'|'sieve'|'sip'|'sips'|'sms'|'snmp'|'soap.beep'|'soap.beeps'|'tag'|'tel'|'telnet'|'tftp'|'thismessage'|'tn3270'|'tip'|'tv'|'urn'|'vemmi'|'ws'|'wss'|'xcon'|'xcon-userid'|'xmlrpc.beep'|'xmlrpc.beeps'|'xmpp'|'z39.50r'|'z39.50s'|'adiumxtra'|'afp'|'afs'|'aim'|'apt'|'attachment'|'aw'|'beshare'|'bitcoin'|'bolo'|'callto'|'chrome'|'chrome-extension'|'com-eventbrite-attendee'|'content'|'cvs'|'dlna-playsingle'|'dlna-playcontainer'|'dtn'|'dvb'|'ed2k'|'facetime'|'feed'|'finger'|'fish'|'gg'|'git'|'gizmoproject'|'gtalk'|'hcp'|'icon'|'ipn'|'irc'|'irc6'|'ircs'|'itms'|'jar'|'jms'|'keyparc'|'lastfm'|'lda
 ps'|'magnet'|'maps'|'market'|'message'|'mms'|'ms-help'|'msnim'|'mumble'|'mvn'|'notes'|'oid'|'palm'|'paparazzi'|'platform'|'proxy'|'psyc'|'query'|'res'|'resource'|'rmi'|'rsync'|'rtmp'|'secondlife'|'sftp'|'sgn'|'skype'|'smb'|'soldat'|'spotify'|'ssh'|'steam'|'svn'|'teamspeak'|'things'|'udp'|'unreal'|'ut2004'|'ventrilo'|'view-source'|'webcal'|'wtai'|'wyciwyg'|'xfire'|'xri'|'ymsgr';
+*/
+
+// Try to match URI autolink after first <, returning number of chars matched.
+int _scan_autolink_uri(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  scheme [:]([^\x00-\x20<>\\]|escaped_char)*[>]  { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Try to match email autolink after first <, returning num of chars matched.
+int _scan_autolink_email(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+
+    [@]
+    [a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?
+    ([.][a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*
+    [>] { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Try to match an HTML tag after first <, returning num of chars matched.
+int _scan_html_tag(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  htmltag { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Try to match an HTML block tag including first <,
+// returning num of chars matched.
+int _scan_html_block_tag(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [<] [/] blocktagname (spacechar | [>])  { return (p - start); }
+  [<] blocktagname (spacechar | [/>]) { return (p - start); }
+  [<] [!?] { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Try to match a URL in a link or reference, return number of chars matched.
+// This may optionally be contained in <..>; otherwise
+// whitespace and unbalanced right parentheses aren't allowed.
+// Newlines aren't ever allowed.
+int _scan_link_url(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [ \n]* [<] ([^<>\n\\\x00] | escaped_char | [\\])* [>] { return (p - start); }
+  [ \n]* (reg_char+ | escaped_char | in_parens_nosp)* { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Try to match a link title (in single quotes, in double quotes, or
+// in parentheses), returning number of chars matched.  Allow one
+// level of internal nesting (quotes within quotes).
+int _scan_link_title(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  ["] (escaped_char|[^"\x00])* ["]   { return (p - start); }
+  ['] (escaped_char|[^'\x00])* ['] { return (p - start); }
+  [(] (escaped_char|[^)\x00])* [)]  { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Match space characters, including newlines.
+int _scan_spacechars(const unsigned char *p)
+{
+  const unsigned char *start = p; \
+/*!re2c
+  [ \t\n]* { return (p - start); }
+  . { return 0; }
+*/
+}
+
+// Match ATX header start.
+int _scan_atx_header_start(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [#]{1,6} ([ ]+|[\n])  { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Match sexext header line.  Return 1 for level-1 header,
+// 2 for level-2, 0 for no match.
+int _scan_setext_header_line(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+/*!re2c
+  [=]+ [ ]* [\n] { return 1; }
+  [-]+ [ ]* [\n] { return 2; }
+  .? { return 0; }
+*/
+}
+
+// Scan a horizontal rule line: "...three or more hyphens, asterisks,
+// or underscores on a line by themselves. If you wish, you may use
+// spaces between the hyphens or asterisks."
+int _scan_hrule(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  ([*][ ]*){3,} [ \t]* [\n] { return (p - start); }
+  ([_][ ]*){3,} [ \t]* [\n] { return (p - start); }
+  ([-][ ]*){3,} [ \t]* [\n] { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Scan an opening code fence.
+int _scan_open_code_fence(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [`]{3,} / [^`\n\x00]*[\n] { return (p - start); }
+  [~]{3,} / [^~\n\x00]*[\n] { return (p - start); }
+  .?                        { return 0; }
+*/
+}
+
+// Scan a closing code fence with length at least len.
+int _scan_close_code_fence(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  ([`]{3,} | [~]{3,}) / spacechar* [\n] { return (p - start); }
+  .? { return 0; }
+*/
+}
+
+// Scans an entity.
+// Returns number of chars matched.
+int _scan_entity(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+/*!re2c
+  [&] ([#] ([Xx][A-Fa-f0-9]{1,8}|[0-9]{1,8}) |[A-Za-z][A-Za-z0-9]{1,31} ) [;]
+     { return (p - start); }
+  .? { return 0; }
+*/
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/utf8.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/utf8.c b/compiler/modules/CommonMark/src/utf8.c
new file mode 100644
index 0000000..e144c72
--- /dev/null
+++ b/compiler/modules/CommonMark/src/utf8.c
@@ -0,0 +1,403 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include <assert.h>
+
+#include "utf8.h"
+
+static const int8_t utf8proc_utf8class[256] = {
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+	2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+	3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+	4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+static void encode_unknown(strbuf *buf)
+{
+	static const uint8_t repl[] = {239, 191, 189};
+	strbuf_put(buf, repl, 3);
+}
+
+int utf8proc_charlen(const uint8_t *str, int str_len)
+{
+	int length, i;
+
+	if (!str_len)
+		return 0;
+
+	length = utf8proc_utf8class[str[0]];
+
+	if (!length)
+		return -1;
+
+	if (str_len >= 0 && length > str_len)
+		return -str_len;
+
+	for (i = 1; i < length; i++) {
+		if ((str[i] & 0xC0) != 0x80)
+			return -i;
+	}
+
+	return length;
+}
+
+void utf8proc_detab(strbuf *ob, const uint8_t *line, size_t size)
+{
+	static const uint8_t whitespace[] = "    ";
+
+	size_t i = 0, tab = 0;
+
+	while (i < size) {
+		size_t org = i;
+
+		while (i < size && line[i] != '\t' && line[i] <= 0x80) {
+			i++; tab++;
+		}
+
+		if (i > org)
+			strbuf_put(ob, line + org, i - org);
+
+		if (i >= size)
+			break;
+
+		if (line[i] == '\t') {
+			int numspaces = 4 - (tab % 4);
+			strbuf_put(ob, whitespace, numspaces);
+			i += 1;
+			tab += numspaces;
+		} else {
+			int charlen = utf8proc_charlen(line + i, size - i);
+
+			if (charlen >= 0) {
+				strbuf_put(ob, line + i, charlen);
+			} else {
+				encode_unknown(ob);
+				charlen = -charlen;
+			}
+
+			i += charlen;
+			tab += 1;
+		}
+	}
+}
+
+int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst)
+{
+	int length;
+	int32_t uc = -1;
+
+	*dst = -1;
+	length = utf8proc_charlen(str, str_len);
+	if (length < 0)
+		return -1;
+
+	switch (length) {
+	case 1:
+		uc = str[0];
+		break;
+	case 2:
+		uc = ((str[0] & 0x1F) <<  6) + (str[1] & 0x3F);
+		if (uc < 0x80) uc = -1;
+		break;
+	case 3:
+		uc = ((str[0] & 0x0F) << 12) + ((str[1] & 0x3F) <<  6)
+			+ (str[2] & 0x3F);
+		if (uc < 0x800 || (uc >= 0xD800 && uc < 0xE000) ||
+		    (uc >= 0xFDD0 && uc < 0xFDF0)) uc = -1;
+		break;
+	case 4:
+		uc = ((str[0] & 0x07) << 18) + ((str[1] & 0x3F) << 12)
+			+ ((str[2] & 0x3F) <<  6) + (str[3] & 0x3F);
+		if (uc < 0x10000 || uc >= 0x110000) uc = -1;
+		break;
+	}
+
+	if (uc < 0 || ((uc & 0xFFFF) >= 0xFFFE))
+		return -1;
+
+	*dst = uc;
+	return length;
+}
+
+void utf8proc_encode_char(int32_t uc, strbuf *buf)
+{
+	uint8_t dst[4];
+	int len = 0;
+
+	assert(uc >= 0);
+
+	if (uc < 0x80) {
+		dst[0] = uc;
+		len = 1;
+	} else if (uc < 0x800) {
+		dst[0] = 0xC0 + (uc >> 6);
+		dst[1] = 0x80 + (uc & 0x3F);
+		len = 2;
+	} else if (uc == 0xFFFF) {
+		dst[0] = 0xFF;
+		len = 1;
+	} else if (uc == 0xFFFE) {
+		dst[0] = 0xFE;
+		len = 1;
+	} else if (uc < 0x10000) {
+		dst[0] = 0xE0 + (uc >> 12);
+		dst[1] = 0x80 + ((uc >> 6) & 0x3F);
+		dst[2] = 0x80 + (uc & 0x3F);
+		len = 3;
+	} else if (uc < 0x110000) {
+		dst[0] = 0xF0 + (uc >> 18);
+		dst[1] = 0x80 + ((uc >> 12) & 0x3F);
+		dst[2] = 0x80 + ((uc >> 6) & 0x3F);
+		dst[3] = 0x80 + (uc & 0x3F);
+		len = 4;
+	} else {
+		encode_unknown(buf);
+		return;
+	}
+
+	strbuf_put(buf, dst, len);
+}
+
+void utf8proc_case_fold(strbuf *dest, const uint8_t *str, int len)
+{
+	int32_t c;
+
+#define bufpush(x)				\
+	utf8proc_encode_char(x, dest)
+
+	while (len > 0) {
+		int char_len = utf8proc_iterate(str, len, &c);
+
+		if (char_len >= 0) {
+#include "case_fold_switch.inc"
+		} else {
+			encode_unknown(dest);
+			char_len = -char_len;
+		}
+
+		str += char_len;
+		len -= char_len;
+	}
+}
+
+// matches anything in the Zs class, plus LF, CR, TAB, FF.
+int utf8proc_is_space(int32_t uc)
+{
+	return (uc == 9 ||
+		uc == 10 ||
+		uc == 12 ||
+		uc == 13 ||
+		uc == 32 ||
+		uc == 160 ||
+		uc == 5760 ||
+		(uc >= 8192 && uc <= 8202) ||
+		uc == 8239 ||
+		uc == 8287 ||
+		uc == 12288);
+}
+
+// matches anything in the P[cdefios] classes.
+int utf8proc_is_punctuation(int32_t uc)
+{
+	return ((uc >= 33 && uc <= 35) ||
+		(uc >= 37 && uc <= 42) ||
+		(uc >= 44 && uc <= 47) ||
+		uc == 58 ||
+		uc == 59 ||
+		uc == 63 ||
+		uc == 64 ||
+		(uc >= 91 && uc <= 93) ||
+		uc == 95 ||
+		uc == 123 ||
+		uc == 125 ||
+		uc == 161 ||
+		uc == 167 ||
+		uc == 171 ||
+		uc == 182 ||
+		uc == 183 ||
+		uc == 187 ||
+		uc == 191 ||
+		uc == 894 ||
+		uc == 903 ||
+		(uc >= 1370 && uc <= 1375) ||
+		uc == 1417 ||
+		uc == 1418 ||
+		uc == 1470 ||
+		uc == 1472 ||
+		uc == 1475 ||
+		uc == 1478 ||
+		uc == 1523 ||
+		uc == 1524 ||
+		uc == 1545 ||
+		uc == 1546 ||
+		uc == 1548 ||
+		uc == 1549 ||
+		uc == 1563 ||
+		uc == 1566 ||
+		uc == 1567 ||
+		(uc >= 1642 && uc <= 1645) ||
+		uc == 1748 ||
+		(uc >= 1792 && uc <= 1805) ||
+		(uc >= 2039 && uc <= 2041) ||
+		(uc >= 2096 && uc <= 2110) ||
+		uc == 2142 ||
+		uc == 2404 ||
+		uc == 2405 ||
+		uc == 2416 ||
+		uc == 2800 ||
+		uc == 3572 ||
+		uc == 3663 ||
+		uc == 3674 ||
+		uc == 3675 ||
+		(uc >= 3844 && uc <= 3858) ||
+		uc == 3860 ||
+		(uc >= 3898 && uc <= 3901) ||
+		uc == 3973 ||
+		(uc >= 4048 && uc <= 4052) ||
+		uc == 4057 ||
+		uc == 4058 ||
+		(uc >= 4170 && uc <= 4175) ||
+		uc == 4347 ||
+		(uc >= 4960 && uc <= 4968) ||
+		uc == 5120 ||
+		uc == 5741 ||
+		uc == 5742 ||
+		uc == 5787 ||
+		uc == 5788 ||
+		(uc >= 5867 && uc <= 5869) ||
+		uc == 5941 ||
+		uc == 5942 ||
+		(uc >= 6100 && uc <= 6102) ||
+		(uc >= 6104 && uc <= 6106) ||
+		(uc >= 6144 && uc <= 6154) ||
+		uc == 6468 ||
+		uc == 6469 ||
+		uc == 6686 ||
+		uc == 6687 ||
+		(uc >= 6816 && uc <= 6822) ||
+		(uc >= 6824 && uc <= 6829) ||
+		(uc >= 7002 && uc <= 7008) ||
+		(uc >= 7164 && uc <= 7167) ||
+		(uc >= 7227 && uc <= 7231) ||
+		uc == 7294 ||
+		uc == 7295 ||
+		(uc >= 7360 && uc <= 7367) ||
+		uc == 7379 ||
+		(uc >= 8208 && uc <= 8231) ||
+		(uc >= 8240 && uc <= 8259) ||
+		(uc >= 8261 && uc <= 8273) ||
+		(uc >= 8275 && uc <= 8286) ||
+		uc == 8317 ||
+		uc == 8318 ||
+		uc == 8333 ||
+		uc == 8334 ||
+		(uc >= 8968 && uc <= 8971) ||
+		uc == 9001 ||
+		uc == 9002 ||
+		(uc >= 10088 && uc <= 10101) ||
+		uc == 10181 ||
+		uc == 10182 ||
+		(uc >= 10214 && uc <= 10223) ||
+		(uc >= 10627 && uc <= 10648) ||
+		(uc >= 10712 && uc <= 10715) ||
+		uc == 10748 ||
+		uc == 10749 ||
+		(uc >= 11513 && uc <= 11516) ||
+		uc == 11518 ||
+		uc == 11519 ||
+		uc == 11632 ||
+		(uc >= 11776 && uc <= 11822) ||
+		(uc >= 11824 && uc <= 11842) ||
+		(uc >= 12289 && uc <= 12291) ||
+		(uc >= 12296 && uc <= 12305) ||
+		(uc >= 12308 && uc <= 12319) ||
+		uc == 12336 ||
+		uc == 12349 ||
+		uc == 12448 ||
+		uc == 12539 ||
+		uc == 42238 ||
+		uc == 42239 ||
+		(uc >= 42509 && uc <= 42511) ||
+		uc == 42611 ||
+		uc == 42622 ||
+		(uc >= 42738 && uc <= 42743) ||
+		(uc >= 43124 && uc <= 43127) ||
+		uc == 43214 ||
+		uc == 43215 ||
+		(uc >= 43256 && uc <= 43258) ||
+		uc == 43310 ||
+		uc == 43311 ||
+		uc == 43359 ||
+		(uc >= 43457 && uc <= 43469) ||
+		uc == 43486 ||
+		uc == 43487 ||
+		(uc >= 43612 && uc <= 43615) ||
+		uc == 43742 ||
+		uc == 43743 ||
+		uc == 43760 ||
+		uc == 43761 ||
+		uc == 44011 ||
+		uc == 64830 ||
+		uc == 64831 ||
+		(uc >= 65040 && uc <= 65049) ||
+		(uc >= 65072 && uc <= 65106) ||
+		(uc >= 65108 && uc <= 65121) ||
+		uc == 65123 ||
+		uc == 65128 ||
+		uc == 65130 ||
+		uc == 65131 ||
+		(uc >= 65281 && uc <= 65283) ||
+		(uc >= 65285 && uc <= 65290) ||
+		(uc >= 65292 && uc <= 65295) ||
+		uc == 65306 ||
+		uc == 65307 ||
+		uc == 65311 ||
+		uc == 65312 ||
+		(uc >= 65339 && uc <= 65341) ||
+		uc == 65343 ||
+		uc == 65371 ||
+		uc == 65373 ||
+		(uc >= 65375 && uc <= 65381) ||
+		(uc >= 65792 && uc <= 65794) ||
+		uc == 66463 ||
+		uc == 66512 ||
+		uc == 66927 ||
+		uc == 67671 ||
+		uc == 67871 ||
+		uc == 67903 ||
+		(uc >= 68176 && uc <= 68184) ||
+		uc == 68223 ||
+		(uc >= 68336 && uc <= 68342) ||
+		(uc >= 68409 && uc <= 68415) ||
+		(uc >= 68505 && uc <= 68508) ||
+		(uc >= 69703 && uc <= 69709) ||
+		uc == 69819 ||
+		uc == 69820 ||
+		(uc >= 69822 && uc <= 69825) ||
+		(uc >= 69952 && uc <= 69955) ||
+		uc == 70004 ||
+		uc == 70005 ||
+		(uc >= 70085 && uc <= 70088) ||
+		uc == 70093 ||
+		(uc >= 70200 && uc <= 70205) ||
+		uc == 70854 ||
+		(uc >= 71105 && uc <= 71113) ||
+		(uc >= 71233 && uc <= 71235) ||
+		(uc >= 74864 && uc <= 74868) ||
+		uc == 92782 ||
+		uc == 92783 ||
+		uc == 92917 ||
+		(uc >= 92983 && uc <= 92987) ||
+		uc == 92996 ||
+		uc == 113823);
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/utf8.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/utf8.h b/compiler/modules/CommonMark/src/utf8.h
new file mode 100644
index 0000000..319e39a
--- /dev/null
+++ b/compiler/modules/CommonMark/src/utf8.h
@@ -0,0 +1,23 @@
+#ifndef CMARK_UTF8_H
+#define CMARK_UTF8_H
+
+#include <stdint.h>
+#include "buffer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void utf8proc_case_fold(cmark_strbuf *dest, const uint8_t *str, int len);
+void utf8proc_encode_char(int32_t uc, cmark_strbuf *buf);
+int utf8proc_iterate(const uint8_t *str, int str_len, int32_t *dst);
+int utf8proc_charlen(const uint8_t *str, int str_len);
+void utf8proc_detab(cmark_strbuf *dest, const uint8_t *line, size_t size);
+int utf8proc_is_space(int32_t uc);
+int utf8proc_is_punctuation(int32_t uc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


[04/16] lucy-clownfish git commit: Add CommonMark to C build

Posted by nw...@apache.org.
Add CommonMark to C build


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/49169201
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/49169201
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/49169201

Branch: refs/heads/markdown
Commit: 49169201ff0a27ed1e62623fd2e30026e142796d
Parents: 144f0b2
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 13:38:00 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:56 2014 +0100

----------------------------------------------------------------------
 compiler/common/charmonizer.c    | 4 ++++
 compiler/common/charmonizer.main | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/49169201/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index ea0a1f6..0bc9db3 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -7779,6 +7779,8 @@ S_write_makefile(struct chaz_CLI *cli) {
                                         NULL);
     char *src_dir      = chaz_Util_join(dir_sep, base_dir, "src", NULL);
     char *include_dir  = chaz_Util_join(dir_sep, base_dir, "include", NULL);
+    char *cmark_dir    = chaz_Util_join(dir_sep, base_dir, "modules",
+                                        "CommonMark", "src", NULL);
     char *parse_header = chaz_Util_join(dir_sep, src_dir, "CFCParseHeader",
                                         NULL);
     char *cfc_exe      = chaz_Util_join("", "cfc", exe_ext, NULL);
@@ -7815,6 +7817,7 @@ S_write_makefile(struct chaz_CLI *cli) {
     chaz_CFlags_add_include_dir(makefile_cflags, ".");
     chaz_CFlags_add_include_dir(makefile_cflags, include_dir);
     chaz_CFlags_add_include_dir(makefile_cflags, src_dir);
+    chaz_CFlags_add_include_dir(makefile_cflags, cmark_dir);
     if (chaz_CLI_defined(cli, "enable-coverage")) {
         chaz_CFlags_enable_code_coverage(makefile_cflags);
     }
@@ -7832,6 +7835,7 @@ S_write_makefile(struct chaz_CLI *cli) {
     sfc.test_cfc_objs = chaz_MakeFile_add_var(makefile, "TEST_CFC_OBJS", NULL);
 
     chaz_Make_list_files(src_dir, "c", S_source_file_callback, &sfc);
+    chaz_Make_list_files(cmark_dir, "c", S_source_file_callback, &sfc);
 
     scratch = chaz_Util_join("", parse_header, obj_ext, NULL);
     chaz_MakeVar_append(sfc.common_objs, scratch);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/49169201/compiler/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main
index 4794e7d..419b3c9 100644
--- a/compiler/common/charmonizer.main
+++ b/compiler/common/charmonizer.main
@@ -104,6 +104,8 @@ S_write_makefile(struct chaz_CLI *cli) {
                                         NULL);
     char *src_dir      = chaz_Util_join(dir_sep, base_dir, "src", NULL);
     char *include_dir  = chaz_Util_join(dir_sep, base_dir, "include", NULL);
+    char *cmark_dir    = chaz_Util_join(dir_sep, base_dir, "modules",
+                                        "CommonMark", "src", NULL);
     char *parse_header = chaz_Util_join(dir_sep, src_dir, "CFCParseHeader",
                                         NULL);
     char *cfc_exe      = chaz_Util_join("", "cfc", exe_ext, NULL);
@@ -140,6 +142,7 @@ S_write_makefile(struct chaz_CLI *cli) {
     chaz_CFlags_add_include_dir(makefile_cflags, ".");
     chaz_CFlags_add_include_dir(makefile_cflags, include_dir);
     chaz_CFlags_add_include_dir(makefile_cflags, src_dir);
+    chaz_CFlags_add_include_dir(makefile_cflags, cmark_dir);
     if (chaz_CLI_defined(cli, "enable-coverage")) {
         chaz_CFlags_enable_code_coverage(makefile_cflags);
     }
@@ -157,6 +160,7 @@ S_write_makefile(struct chaz_CLI *cli) {
     sfc.test_cfc_objs = chaz_MakeFile_add_var(makefile, "TEST_CFC_OBJS", NULL);
 
     chaz_Make_list_files(src_dir, "c", S_source_file_callback, &sfc);
+    chaz_Make_list_files(cmark_dir, "c", S_source_file_callback, &sfc);
 
     scratch = chaz_Util_join("", parse_header, obj_ext, NULL);
     chaz_MakeVar_append(sfc.common_objs, scratch);


[02/16] lucy-clownfish git commit: Move CFCClass_callback_decs to CFCC.c

Posted by nw...@apache.org.
Move CFCClass_callback_decs to CFCC.c


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/846b230c
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/846b230c
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/846b230c

Branch: refs/heads/markdown
Commit: 846b230c1be07735449f85defaee9eb498b634d7
Parents: d0296b1
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 17:08:19 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:55 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCC.c      | 27 ++++++++++++++++++++++++++-
 compiler/src/CFCCClass.c | 22 ----------------------
 compiler/src/CFCCClass.h |  5 -----
 3 files changed, 26 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/846b230c/compiler/src/CFCC.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCC.c b/compiler/src/CFCC.c
index 60a949b..e6763ce 100644
--- a/compiler/src/CFCC.c
+++ b/compiler/src/CFCC.c
@@ -25,6 +25,7 @@
 #include "CFCCClass.h"
 #include "CFCClass.h"
 #include "CFCHierarchy.h"
+#include "CFCMethod.h"
 #include "CFCUtil.h"
 
 struct CFCC {
@@ -42,6 +43,9 @@ static const CFCMeta CFCC_META = {
     (CFCBase_destroy_t)CFCC_destroy
 };
 
+static char*
+S_callback_decs(CFCClass *klass);
+
 CFCC*
 CFCC_new(CFCHierarchy *hierarchy, const char *header, const char *footer) {
     CFCC *self = (CFCC*)CFCBase_allocate(&CFCC_META);
@@ -84,7 +88,7 @@ CFCC_write_callbacks(CFCC *self) {
         CFCClass *klass = ordered[i];
 
         if (!CFCClass_included(klass)) {
-            char *cb_decs = CFCCClass_callback_decs(klass);
+            char *cb_decs = S_callback_decs(klass);
             all_cb_decs = CFCUtil_cat(all_cb_decs, cb_decs, NULL);
             FREEMEM(cb_decs);
         }
@@ -119,6 +123,27 @@ CFCC_write_callbacks(CFCC *self) {
     FREEMEM(file_content);
 }
 
+static char*
+S_callback_decs(CFCClass *klass) {
+    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
+    char       *cb_decs       = CFCUtil_strdup("");
+
+    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
+        CFCMethod *method = fresh_methods[meth_num];
+
+        // Define callback to NULL.
+        if (CFCMethod_novel(method) && !CFCMethod_final(method)) {
+            const char *override_sym = CFCMethod_full_override_sym(method);
+            cb_decs = CFCUtil_cat(cb_decs, "#define ", override_sym, " NULL\n",
+                                  NULL);
+        }
+    }
+
+    FREEMEM(fresh_methods);
+
+    return cb_decs;
+}
+
 void
 CFCC_write_man_pages(CFCC *self) {
     CFCHierarchy  *hierarchy = self->hierarchy;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/846b230c/compiler/src/CFCCClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCClass.c b/compiler/src/CFCCClass.c
index 8dfe9db..b413990 100644
--- a/compiler/src/CFCCClass.c
+++ b/compiler/src/CFCCClass.c
@@ -73,28 +73,6 @@ S_man_escape_content(const char *content);
 static void
 S_parse_pod_link(const char *content, CFCPodLink *pod_link);
 
-// Declare dummy host callbacks.
-char*
-CFCCClass_callback_decs(CFCClass *klass) {
-    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
-    char       *cb_decs       = CFCUtil_strdup("");
-
-    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
-        CFCMethod *method = fresh_methods[meth_num];
-
-        // Define callback to NULL.
-        if (CFCMethod_novel(method) && !CFCMethod_final(method)) {
-            const char *override_sym = CFCMethod_full_override_sym(method);
-            cb_decs = CFCUtil_cat(cb_decs, "#define ", override_sym, " NULL\n",
-                                  NULL);
-        }
-    }
-
-    FREEMEM(fresh_methods);
-
-    return cb_decs;
-}
-
 char*
 CFCCClass_create_man_page(CFCClass *klass) {
     if (!CFCSymbol_public((CFCSymbol*)klass)) { return NULL; }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/846b230c/compiler/src/CFCCClass.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCClass.h b/compiler/src/CFCCClass.h
index b319596..710278d 100644
--- a/compiler/src/CFCCClass.h
+++ b/compiler/src/CFCCClass.h
@@ -23,11 +23,6 @@ extern "C" {
 
 struct CFCClass;
 
-/* Return dummy host callbacks defined to NULL.
- */
-char*
-CFCCClass_callback_decs(struct CFCClass *klass);
-
 /** Return the man page for the class.
  */
 char*


[07/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/scanners.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/scanners.c b/compiler/modules/CommonMark/src/scanners.c
new file mode 100644
index 0000000..5db2736
--- /dev/null
+++ b/compiler/modules/CommonMark/src/scanners.c
@@ -0,0 +1,12398 @@
+/* Generated by re2c 0.13.5 on Tue Nov 18 21:33:36 2014 */
+#include <stdlib.h>
+#include "chunk.h"
+#include "scanners.h"
+
+int _scan_at(int (*scanner)(const unsigned char *), chunk *c, int offset)
+{
+	int res;
+	unsigned char *ptr = (unsigned char *)c->data;
+	unsigned char lim = ptr[c->len];
+
+	ptr[c->len] = '\0';
+	res = scanner(ptr + offset);
+	ptr[c->len] = lim;
+
+	return res;
+}
+
+
+
+// Try to match URI autolink after first <, returning number of chars matched.
+int _scan_autolink_uri(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+
+{
+	unsigned char yych;
+	static const unsigned char yybm[] = {
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128,   0, 128,   0, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128,   0, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+	};
+
+	yych = *p;
+	switch (yych) {
+	case '\n':	goto yy2;
+	case 'A':
+	case 'a':	goto yy6;
+	case 'B':
+	case 'b':	goto yy24;
+	case 'C':
+	case 'c':	goto yy3;
+	case 'D':
+	case 'd':	goto yy4;
+	case 'E':
+	case 'e':	goto yy25;
+	case 'F':
+	case 'f':	goto yy7;
+	case 'G':
+	case 'g':	goto yy8;
+	case 'H':
+	case 'h':	goto yy9;
+	case 'I':
+	case 'i':	goto yy10;
+	case 'J':
+	case 'j':	goto yy5;
+	case 'K':
+	case 'k':	goto yy26;
+	case 'L':
+	case 'l':	goto yy11;
+	case 'M':
+	case 'm':	goto yy12;
+	case 'N':
+	case 'n':	goto yy13;
+	case 'O':
+	case 'o':	goto yy14;
+	case 'P':
+	case 'p':	goto yy15;
+	case 'Q':
+	case 'q':	goto yy27;
+	case 'R':
+	case 'r':	goto yy16;
+	case 'S':
+	case 's':	goto yy17;
+	case 'T':
+	case 't':	goto yy18;
+	case 'U':
+	case 'u':	goto yy19;
+	case 'V':
+	case 'v':	goto yy20;
+	case 'W':
+	case 'w':	goto yy21;
+	case 'X':
+	case 'x':	goto yy22;
+	case 'Y':
+	case 'y':	goto yy28;
+	case 'Z':
+	case 'z':	goto yy23;
+	default:	goto yy29;
+	}
+yy2:
+	{ return 0; }
+yy3:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy443;
+	case 'H':
+	case 'h':	goto yy442;
+	case 'I':
+	case 'i':	goto yy445;
+	case 'O':
+	case 'o':	goto yy441;
+	case 'R':
+	case 'r':	goto yy444;
+	case 'V':
+	case 'v':	goto yy440;
+	default:	goto yy2;
+	}
+yy4:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy416;
+	case 'I':
+	case 'i':	goto yy415;
+	case 'L':
+	case 'l':	goto yy413;
+	case 'N':
+	case 'n':	goto yy414;
+	case 'O':
+	case 'o':	goto yy417;
+	case 'T':
+	case 't':	goto yy412;
+	case 'V':
+	case 'v':	goto yy411;
+	default:	goto yy2;
+	}
+yy5:
+	yych = *(marker = ++p);
+	if (yych <= 'M') {
+		if (yych == 'A') goto yy403;
+		if (yych <= 'L') goto yy2;
+		goto yy402;
+	} else {
+		if (yych <= 'a') {
+			if (yych <= '`') goto yy2;
+			goto yy403;
+		} else {
+			if (yych == 'm') goto yy402;
+			goto yy2;
+		}
+	}
+yy6:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy384;
+	case 'B':
+	case 'b':	goto yy383;
+	case 'C':
+	case 'c':	goto yy382;
+	case 'D':
+	case 'd':	goto yy381;
+	case 'F':
+	case 'f':	goto yy380;
+	case 'I':
+	case 'i':	goto yy379;
+	case 'P':
+	case 'p':	goto yy378;
+	case 'T':
+	case 't':	goto yy377;
+	case 'W':
+	case 'w':	goto yy34;
+	default:	goto yy2;
+	}
+yy7:
+	yych = *(marker = ++p);
+	if (yych <= 'T') {
+		if (yych <= 'E') {
+			if (yych == 'A') goto yy364;
+			if (yych <= 'D') goto yy2;
+			goto yy363;
+		} else {
+			if (yych == 'I') goto yy362;
+			if (yych <= 'S') goto yy2;
+			goto yy365;
+		}
+	} else {
+		if (yych <= 'e') {
+			if (yych == 'a') goto yy364;
+			if (yych <= 'd') goto yy2;
+			goto yy363;
+		} else {
+			if (yych <= 'i') {
+				if (yych <= 'h') goto yy2;
+				goto yy362;
+			} else {
+				if (yych == 't') goto yy365;
+				goto yy2;
+			}
+		}
+	}
+yy8:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'E':
+	case 'e':	goto yy347;
+	case 'G':
+	case 'g':	goto yy34;
+	case 'I':
+	case 'i':	goto yy345;
+	case 'O':
+	case 'o':	goto yy346;
+	case 'T':
+	case 't':	goto yy344;
+	default:	goto yy2;
+	}
+yy9:
+	yych = *(marker = ++p);
+	if (yych <= 'S') {
+		if (yych <= '3') {
+			if (yych <= '2') goto yy2;
+			goto yy340;
+		} else {
+			if (yych == 'C') goto yy338;
+			goto yy2;
+		}
+	} else {
+		if (yych <= 'c') {
+			if (yych <= 'T') goto yy339;
+			if (yych <= 'b') goto yy2;
+			goto yy338;
+		} else {
+			if (yych == 't') goto yy339;
+			goto yy2;
+		}
+	}
+yy10:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy320;
+	case 'C':
+	case 'c':	goto yy317;
+	case 'M':
+	case 'm':	goto yy319;
+	case 'N':
+	case 'n':	goto yy318;
+	case 'P':
+	case 'p':	goto yy316;
+	case 'R':
+	case 'r':	goto yy315;
+	case 'T':
+	case 't':	goto yy314;
+	default:	goto yy2;
+	}
+yy11:
+	yych = *(marker = ++p);
+	if (yych <= 'D') {
+		if (yych == 'A') goto yy308;
+		if (yych <= 'C') goto yy2;
+		goto yy307;
+	} else {
+		if (yych <= 'a') {
+			if (yych <= '`') goto yy2;
+			goto yy308;
+		} else {
+			if (yych == 'd') goto yy307;
+			goto yy2;
+		}
+	}
+yy12:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy274;
+	case 'E':
+	case 'e':	goto yy273;
+	case 'I':
+	case 'i':	goto yy276;
+	case 'M':
+	case 'm':	goto yy272;
+	case 'S':
+	case 's':	goto yy271;
+	case 'T':
+	case 't':	goto yy275;
+	case 'U':
+	case 'u':	goto yy270;
+	case 'V':
+	case 'v':	goto yy269;
+	default:	goto yy2;
+	}
+yy13:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'E':
+	case 'e':	goto yy264;
+	case 'F':
+	case 'f':	goto yy263;
+	case 'I':
+	case 'i':	goto yy262;
+	case 'N':
+	case 'n':	goto yy261;
+	case 'O':
+	case 'o':	goto yy260;
+	default:	goto yy2;
+	}
+yy14:
+	yych = *(marker = ++p);
+	if (yych <= 'P') {
+		if (yych == 'I') goto yy246;
+		if (yych <= 'O') goto yy2;
+		goto yy247;
+	} else {
+		if (yych <= 'i') {
+			if (yych <= 'h') goto yy2;
+			goto yy246;
+		} else {
+			if (yych == 'p') goto yy247;
+			goto yy2;
+		}
+	}
+yy15:
+	yych = *(marker = ++p);
+	if (yych <= 'S') {
+		if (yych <= 'L') {
+			if (yych == 'A') goto yy228;
+			if (yych <= 'K') goto yy2;
+			goto yy227;
+		} else {
+			if (yych <= 'O') {
+				if (yych <= 'N') goto yy2;
+				goto yy229;
+			} else {
+				if (yych <= 'Q') goto yy2;
+				if (yych <= 'R') goto yy226;
+				goto yy225;
+			}
+		}
+	} else {
+		if (yych <= 'n') {
+			if (yych <= 'a') {
+				if (yych <= '`') goto yy2;
+				goto yy228;
+			} else {
+				if (yych == 'l') goto yy227;
+				goto yy2;
+			}
+		} else {
+			if (yych <= 'q') {
+				if (yych <= 'o') goto yy229;
+				goto yy2;
+			} else {
+				if (yych <= 'r') goto yy226;
+				if (yych <= 's') goto yy225;
+				goto yy2;
+			}
+		}
+	}
+yy16:
+	yych = *(marker = ++p);
+	if (yych <= 'T') {
+		if (yych <= 'L') {
+			if (yych == 'E') goto yy215;
+			goto yy2;
+		} else {
+			if (yych <= 'M') goto yy214;
+			if (yych <= 'R') goto yy2;
+			if (yych <= 'S') goto yy213;
+			goto yy212;
+		}
+	} else {
+		if (yych <= 'm') {
+			if (yych == 'e') goto yy215;
+			if (yych <= 'l') goto yy2;
+			goto yy214;
+		} else {
+			if (yych <= 'r') goto yy2;
+			if (yych <= 's') goto yy213;
+			if (yych <= 't') goto yy212;
+			goto yy2;
+		}
+	}
+yy17:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'E':
+	case 'e':	goto yy168;
+	case 'F':
+	case 'f':	goto yy167;
+	case 'G':
+	case 'g':	goto yy166;
+	case 'H':
+	case 'h':	goto yy171;
+	case 'I':
+	case 'i':	goto yy170;
+	case 'K':
+	case 'k':	goto yy165;
+	case 'M':
+	case 'm':	goto yy164;
+	case 'N':
+	case 'n':	goto yy169;
+	case 'O':
+	case 'o':	goto yy163;
+	case 'P':
+	case 'p':	goto yy162;
+	case 'S':
+	case 's':	goto yy161;
+	case 'T':
+	case 't':	goto yy160;
+	case 'V':
+	case 'v':	goto yy159;
+	default:	goto yy2;
+	}
+yy18:
+	yych = *(marker = ++p);
+	switch (yych) {
+	case 'A':
+	case 'a':	goto yy135;
+	case 'E':
+	case 'e':	goto yy131;
+	case 'F':
+	case 'f':	goto yy134;
+	case 'H':
+	case 'h':	goto yy130;
+	case 'I':
+	case 'i':	goto yy132;
+	case 'N':
+	case 'n':	goto yy133;
+	case 'V':
+	case 'v':	goto yy34;
+	default:	goto yy2;
+	}
+yy19:
+	yych = *(marker = ++p);
+	if (yych <= 'T') {
+		if (yych <= 'N') {
+			if (yych == 'D') goto yy122;
+			if (yych <= 'M') goto yy2;
+			goto yy121;
+		} else {
+			if (yych == 'R') goto yy123;
+			if (yych <= 'S') goto yy2;
+			goto yy120;
+		}
+	} else {
+		if (yych <= 'n') {
+			if (yych == 'd') goto yy122;
+			if (yych <= 'm') goto yy2;
+			goto yy121;
+		} else {
+			if (yych <= 'r') {
+				if (yych <= 'q') goto yy2;
+				goto yy123;
+			} else {
+				if (yych == 't') goto yy120;
+				goto yy2;
+			}
+		}
+	}
+yy20:
+	yych = *(marker = ++p);
+	if (yych <= 'I') {
+		if (yych == 'E') goto yy104;
+		if (yych <= 'H') goto yy2;
+		goto yy103;
+	} else {
+		if (yych <= 'e') {
+			if (yych <= 'd') goto yy2;
+			goto yy104;
+		} else {
+			if (yych == 'i') goto yy103;
+			goto yy2;
+		}
+	}
+yy21:
+	yych = *(marker = ++p);
+	if (yych <= 'Y') {
+		if (yych <= 'R') {
+			if (yych == 'E') goto yy93;
+			goto yy2;
+		} else {
+			if (yych <= 'S') goto yy94;
+			if (yych <= 'T') goto yy92;
+			if (yych <= 'X') goto yy2;
+			goto yy91;
+		}
+	} else {
+		if (yych <= 's') {
+			if (yych == 'e') goto yy93;
+			if (yych <= 'r') goto yy2;
+			goto yy94;
+		} else {
+			if (yych <= 't') goto yy92;
+			if (yych == 'y') goto yy91;
+			goto yy2;
+		}
+	}
+yy22:
+	yych = *(marker = ++p);
+	if (yych <= 'R') {
+		if (yych <= 'F') {
+			if (yych == 'C') goto yy70;
+			if (yych <= 'E') goto yy2;
+			goto yy68;
+		} else {
+			if (yych == 'M') goto yy69;
+			if (yych <= 'Q') goto yy2;
+			goto yy67;
+		}
+	} else {
+		if (yych <= 'f') {
+			if (yych == 'c') goto yy70;
+			if (yych <= 'e') goto yy2;
+			goto yy68;
+		} else {
+			if (yych <= 'm') {
+				if (yych <= 'l') goto yy2;
+				goto yy69;
+			} else {
+				if (yych == 'r') goto yy67;
+				goto yy2;
+			}
+		}
+	}
+yy23:
+	yych = *(marker = ++p);
+	if (yych == '3') goto yy62;
+	goto yy2;
+yy24:
+	yych = *(marker = ++p);
+	if (yych <= 'O') {
+		if (yych <= 'H') {
+			if (yych == 'E') goto yy52;
+			goto yy2;
+		} else {
+			if (yych <= 'I') goto yy51;
+			if (yych <= 'N') goto yy2;
+			goto yy50;
+		}
+	} else {
+		if (yych <= 'h') {
+			if (yych == 'e') goto yy52;
+			goto yy2;
+		} else {
+			if (yych <= 'i') goto yy51;
+			if (yych == 'o') goto yy50;
+			goto yy2;
+		}
+	}
+yy25:
+	yych = *(marker = ++p);
+	if (yych == 'D') goto yy48;
+	if (yych == 'd') goto yy48;
+	goto yy2;
+yy26:
+	yych = *(marker = ++p);
+	if (yych == 'E') goto yy43;
+	if (yych == 'e') goto yy43;
+	goto yy2;
+yy27:
+	yych = *(marker = ++p);
+	if (yych == 'U') goto yy40;
+	if (yych == 'u') goto yy40;
+	goto yy2;
+yy28:
+	yych = *(marker = ++p);
+	if (yych == 'M') goto yy30;
+	if (yych == 'm') goto yy30;
+	goto yy2;
+yy29:
+	yych = *++p;
+	goto yy2;
+yy30:
+	yych = *++p;
+	if (yych == 'S') goto yy32;
+	if (yych == 's') goto yy32;
+yy31:
+	p = marker;
+	goto yy2;
+yy32:
+	yych = *++p;
+	if (yych == 'G') goto yy33;
+	if (yych != 'g') goto yy31;
+yy33:
+	yych = *++p;
+	if (yych == 'R') goto yy34;
+	if (yych != 'r') goto yy31;
+yy34:
+	yych = *++p;
+	if (yych != ':') goto yy31;
+yy35:
+	++p;
+	yych = *p;
+	if (yybm[0+yych] & 128) {
+		goto yy35;
+	}
+	if (yych <= '=') goto yy31;
+	if (yych <= '>') goto yy38;
+	++p;
+	yych = *p;
+	if (yych <= '@') {
+		if (yych <= ' ') goto yy31;
+		if (yych <= '/') goto yy35;
+		if (yych <= '9') goto yy31;
+		goto yy35;
+	} else {
+		if (yych <= '`') {
+			if (yych <= 'Z') goto yy31;
+			goto yy35;
+		} else {
+			if (yych <= 'z') goto yy31;
+			if (yych <= '~') goto yy35;
+			goto yy31;
+		}
+	}
+yy38:
+	++p;
+	{ return (p - start); }
+yy40:
+	yych = *++p;
+	if (yych == 'E') goto yy41;
+	if (yych != 'e') goto yy31;
+yy41:
+	yych = *++p;
+	if (yych == 'R') goto yy42;
+	if (yych != 'r') goto yy31;
+yy42:
+	yych = *++p;
+	if (yych == 'Y') goto yy34;
+	if (yych == 'y') goto yy34;
+	goto yy31;
+yy43:
+	yych = *++p;
+	if (yych == 'Y') goto yy44;
+	if (yych != 'y') goto yy31;
+yy44:
+	yych = *++p;
+	if (yych == 'P') goto yy45;
+	if (yych != 'p') goto yy31;
+yy45:
+	yych = *++p;
+	if (yych == 'A') goto yy46;
+	if (yych != 'a') goto yy31;
+yy46:
+	yych = *++p;
+	if (yych == 'R') goto yy47;
+	if (yych != 'r') goto yy31;
+yy47:
+	yych = *++p;
+	if (yych == 'C') goto yy34;
+	if (yych == 'c') goto yy34;
+	goto yy31;
+yy48:
+	yych = *++p;
+	if (yych != '2') goto yy31;
+	yych = *++p;
+	if (yych == 'K') goto yy34;
+	if (yych == 'k') goto yy34;
+	goto yy31;
+yy50:
+	yych = *++p;
+	if (yych == 'L') goto yy61;
+	if (yych == 'l') goto yy61;
+	goto yy31;
+yy51:
+	yych = *++p;
+	if (yych == 'T') goto yy57;
+	if (yych == 't') goto yy57;
+	goto yy31;
+yy52:
+	yych = *++p;
+	if (yych == 'S') goto yy53;
+	if (yych != 's') goto yy31;
+yy53:
+	yych = *++p;
+	if (yych == 'H') goto yy54;
+	if (yych != 'h') goto yy31;
+yy54:
+	yych = *++p;
+	if (yych == 'A') goto yy55;
+	if (yych != 'a') goto yy31;
+yy55:
+	yych = *++p;
+	if (yych == 'R') goto yy56;
+	if (yych != 'r') goto yy31;
+yy56:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy57:
+	yych = *++p;
+	if (yych == 'C') goto yy58;
+	if (yych != 'c') goto yy31;
+yy58:
+	yych = *++p;
+	if (yych == 'O') goto yy59;
+	if (yych != 'o') goto yy31;
+yy59:
+	yych = *++p;
+	if (yych == 'I') goto yy60;
+	if (yych != 'i') goto yy31;
+yy60:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy61:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy62:
+	yych = *++p;
+	if (yych != '9') goto yy31;
+	yych = *++p;
+	if (yych != '.') goto yy31;
+	yych = *++p;
+	if (yych != '5') goto yy31;
+	yych = *++p;
+	if (yych != '0') goto yy31;
+	yych = *++p;
+	if (yych <= 'Q') goto yy31;
+	if (yych <= 'S') goto yy34;
+	if (yych <= 'q') goto yy31;
+	if (yych <= 's') goto yy34;
+	goto yy31;
+yy67:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy68:
+	yych = *++p;
+	if (yych == 'I') goto yy89;
+	if (yych == 'i') goto yy89;
+	goto yy31;
+yy69:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'L') goto yy79;
+		if (yych <= 'O') goto yy31;
+		goto yy80;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy31;
+			goto yy79;
+		} else {
+			if (yych == 'p') goto yy80;
+			goto yy31;
+		}
+	}
+yy70:
+	yych = *++p;
+	if (yych == 'O') goto yy71;
+	if (yych != 'o') goto yy31;
+yy71:
+	yych = *++p;
+	if (yych == 'N') goto yy72;
+	if (yych != 'n') goto yy31;
+yy72:
+	yych = *++p;
+	if (yych == '-') goto yy73;
+	if (yych == ':') goto yy35;
+	goto yy31;
+yy73:
+	yych = *++p;
+	if (yych == 'U') goto yy74;
+	if (yych != 'u') goto yy31;
+yy74:
+	yych = *++p;
+	if (yych == 'S') goto yy75;
+	if (yych != 's') goto yy31;
+yy75:
+	yych = *++p;
+	if (yych == 'E') goto yy76;
+	if (yych != 'e') goto yy31;
+yy76:
+	yych = *++p;
+	if (yych == 'R') goto yy77;
+	if (yych != 'r') goto yy31;
+yy77:
+	yych = *++p;
+	if (yych == 'I') goto yy78;
+	if (yych != 'i') goto yy31;
+yy78:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy79:
+	yych = *++p;
+	if (yych == 'R') goto yy81;
+	if (yych == 'r') goto yy81;
+	goto yy31;
+yy80:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy81:
+	yych = *++p;
+	if (yych == 'P') goto yy82;
+	if (yych != 'p') goto yy31;
+yy82:
+	yych = *++p;
+	if (yych == 'C') goto yy83;
+	if (yych != 'c') goto yy31;
+yy83:
+	yych = *++p;
+	if (yych != '.') goto yy31;
+	yych = *++p;
+	if (yych == 'B') goto yy85;
+	if (yych != 'b') goto yy31;
+yy85:
+	yych = *++p;
+	if (yych == 'E') goto yy86;
+	if (yych != 'e') goto yy31;
+yy86:
+	yych = *++p;
+	if (yych == 'E') goto yy87;
+	if (yych != 'e') goto yy31;
+yy87:
+	yych = *++p;
+	if (yych == 'P') goto yy88;
+	if (yych != 'p') goto yy31;
+yy88:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy89:
+	yych = *++p;
+	if (yych == 'R') goto yy90;
+	if (yych != 'r') goto yy31;
+yy90:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy91:
+	yych = *++p;
+	if (yych == 'C') goto yy99;
+	if (yych == 'c') goto yy99;
+	goto yy31;
+yy92:
+	yych = *++p;
+	if (yych == 'A') goto yy98;
+	if (yych == 'a') goto yy98;
+	goto yy31;
+yy93:
+	yych = *++p;
+	if (yych == 'B') goto yy95;
+	if (yych == 'b') goto yy95;
+	goto yy31;
+yy94:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy95:
+	yych = *++p;
+	if (yych == 'C') goto yy96;
+	if (yych != 'c') goto yy31;
+yy96:
+	yych = *++p;
+	if (yych == 'A') goto yy97;
+	if (yych != 'a') goto yy31;
+yy97:
+	yych = *++p;
+	if (yych == 'L') goto yy34;
+	if (yych == 'l') goto yy34;
+	goto yy31;
+yy98:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy99:
+	yych = *++p;
+	if (yych == 'I') goto yy100;
+	if (yych != 'i') goto yy31;
+yy100:
+	yych = *++p;
+	if (yych == 'W') goto yy101;
+	if (yych != 'w') goto yy31;
+yy101:
+	yych = *++p;
+	if (yych == 'Y') goto yy102;
+	if (yych != 'y') goto yy31;
+yy102:
+	yych = *++p;
+	if (yych == 'G') goto yy34;
+	if (yych == 'g') goto yy34;
+	goto yy31;
+yy103:
+	yych = *++p;
+	if (yych == 'E') goto yy112;
+	if (yych == 'e') goto yy112;
+	goto yy31;
+yy104:
+	yych = *++p;
+	if (yych <= 'N') {
+		if (yych <= 'L') goto yy31;
+		if (yych >= 'N') goto yy106;
+	} else {
+		if (yych <= 'l') goto yy31;
+		if (yych <= 'm') goto yy105;
+		if (yych <= 'n') goto yy106;
+		goto yy31;
+	}
+yy105:
+	yych = *++p;
+	if (yych == 'M') goto yy111;
+	if (yych == 'm') goto yy111;
+	goto yy31;
+yy106:
+	yych = *++p;
+	if (yych == 'T') goto yy107;
+	if (yych != 't') goto yy31;
+yy107:
+	yych = *++p;
+	if (yych == 'R') goto yy108;
+	if (yych != 'r') goto yy31;
+yy108:
+	yych = *++p;
+	if (yych == 'I') goto yy109;
+	if (yych != 'i') goto yy31;
+yy109:
+	yych = *++p;
+	if (yych == 'L') goto yy110;
+	if (yych != 'l') goto yy31;
+yy110:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy111:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy112:
+	yych = *++p;
+	if (yych == 'W') goto yy113;
+	if (yych != 'w') goto yy31;
+yy113:
+	yych = *++p;
+	if (yych != '-') goto yy31;
+	yych = *++p;
+	if (yych == 'S') goto yy115;
+	if (yych != 's') goto yy31;
+yy115:
+	yych = *++p;
+	if (yych == 'O') goto yy116;
+	if (yych != 'o') goto yy31;
+yy116:
+	yych = *++p;
+	if (yych == 'U') goto yy117;
+	if (yych != 'u') goto yy31;
+yy117:
+	yych = *++p;
+	if (yych == 'R') goto yy118;
+	if (yych != 'r') goto yy31;
+yy118:
+	yych = *++p;
+	if (yych == 'C') goto yy119;
+	if (yych != 'c') goto yy31;
+yy119:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy120:
+	yych = *++p;
+	if (yych == '2') goto yy127;
+	goto yy31;
+yy121:
+	yych = *++p;
+	if (yych == 'R') goto yy124;
+	if (yych == 'r') goto yy124;
+	goto yy31;
+yy122:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy123:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy124:
+	yych = *++p;
+	if (yych == 'E') goto yy125;
+	if (yych != 'e') goto yy31;
+yy125:
+	yych = *++p;
+	if (yych == 'A') goto yy126;
+	if (yych != 'a') goto yy31;
+yy126:
+	yych = *++p;
+	if (yych == 'L') goto yy34;
+	if (yych == 'l') goto yy34;
+	goto yy31;
+yy127:
+	yych = *++p;
+	if (yych != '0') goto yy31;
+	yych = *++p;
+	if (yych != '0') goto yy31;
+	yych = *++p;
+	if (yych == '4') goto yy34;
+	goto yy31;
+yy130:
+	yych = *++p;
+	if (yych == 'I') goto yy149;
+	if (yych == 'i') goto yy149;
+	goto yy31;
+yy131:
+	yych = *++p;
+	if (yych <= 'L') {
+		if (yych == 'A') goto yy141;
+		if (yych <= 'K') goto yy31;
+		goto yy140;
+	} else {
+		if (yych <= 'a') {
+			if (yych <= '`') goto yy31;
+			goto yy141;
+		} else {
+			if (yych == 'l') goto yy140;
+			goto yy31;
+		}
+	}
+yy132:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy133:
+	yych = *++p;
+	if (yych == '3') goto yy137;
+	goto yy31;
+yy134:
+	yych = *++p;
+	if (yych == 'T') goto yy136;
+	if (yych == 't') goto yy136;
+	goto yy31;
+yy135:
+	yych = *++p;
+	if (yych == 'G') goto yy34;
+	if (yych == 'g') goto yy34;
+	goto yy31;
+yy136:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy137:
+	yych = *++p;
+	if (yych != '2') goto yy31;
+	yych = *++p;
+	if (yych != '7') goto yy31;
+	yych = *++p;
+	if (yych == '0') goto yy34;
+	goto yy31;
+yy140:
+	yych = *++p;
+	if (yych <= 'M') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'N') goto yy147;
+		if (yych == 'n') goto yy147;
+		goto yy31;
+	}
+yy141:
+	yych = *++p;
+	if (yych == 'M') goto yy142;
+	if (yych != 'm') goto yy31;
+yy142:
+	yych = *++p;
+	if (yych == 'S') goto yy143;
+	if (yych != 's') goto yy31;
+yy143:
+	yych = *++p;
+	if (yych == 'P') goto yy144;
+	if (yych != 'p') goto yy31;
+yy144:
+	yych = *++p;
+	if (yych == 'E') goto yy145;
+	if (yych != 'e') goto yy31;
+yy145:
+	yych = *++p;
+	if (yych == 'A') goto yy146;
+	if (yych != 'a') goto yy31;
+yy146:
+	yych = *++p;
+	if (yych == 'K') goto yy34;
+	if (yych == 'k') goto yy34;
+	goto yy31;
+yy147:
+	yych = *++p;
+	if (yych == 'E') goto yy148;
+	if (yych != 'e') goto yy31;
+yy148:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy149:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych == 'N') goto yy150;
+		if (yych <= 'R') goto yy31;
+		goto yy151;
+	} else {
+		if (yych <= 'n') {
+			if (yych <= 'm') goto yy31;
+		} else {
+			if (yych == 's') goto yy151;
+			goto yy31;
+		}
+	}
+yy150:
+	yych = *++p;
+	if (yych == 'G') goto yy158;
+	if (yych == 'g') goto yy158;
+	goto yy31;
+yy151:
+	yych = *++p;
+	if (yych == 'M') goto yy152;
+	if (yych != 'm') goto yy31;
+yy152:
+	yych = *++p;
+	if (yych == 'E') goto yy153;
+	if (yych != 'e') goto yy31;
+yy153:
+	yych = *++p;
+	if (yych == 'S') goto yy154;
+	if (yych != 's') goto yy31;
+yy154:
+	yych = *++p;
+	if (yych == 'S') goto yy155;
+	if (yych != 's') goto yy31;
+yy155:
+	yych = *++p;
+	if (yych == 'A') goto yy156;
+	if (yych != 'a') goto yy31;
+yy156:
+	yych = *++p;
+	if (yych == 'G') goto yy157;
+	if (yych != 'g') goto yy31;
+yy157:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy158:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy159:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy160:
+	yych = *++p;
+	if (yych == 'E') goto yy210;
+	if (yych == 'e') goto yy210;
+	goto yy31;
+yy161:
+	yych = *++p;
+	if (yych == 'H') goto yy34;
+	if (yych == 'h') goto yy34;
+	goto yy31;
+yy162:
+	yych = *++p;
+	if (yych == 'O') goto yy206;
+	if (yych == 'o') goto yy206;
+	goto yy31;
+yy163:
+	yych = *++p;
+	if (yych <= 'L') {
+		if (yych == 'A') goto yy196;
+		if (yych <= 'K') goto yy31;
+		goto yy197;
+	} else {
+		if (yych <= 'a') {
+			if (yych <= '`') goto yy31;
+			goto yy196;
+		} else {
+			if (yych == 'l') goto yy197;
+			goto yy31;
+		}
+	}
+yy164:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych == 'B') goto yy34;
+		if (yych <= 'R') goto yy31;
+		goto yy34;
+	} else {
+		if (yych <= 'b') {
+			if (yych <= 'a') goto yy31;
+			goto yy34;
+		} else {
+			if (yych == 's') goto yy34;
+			goto yy31;
+		}
+	}
+yy165:
+	yych = *++p;
+	if (yych == 'Y') goto yy194;
+	if (yych == 'y') goto yy194;
+	goto yy31;
+yy166:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy167:
+	yych = *++p;
+	if (yych == 'T') goto yy193;
+	if (yych == 't') goto yy193;
+	goto yy31;
+yy168:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych <= 'C') {
+			if (yych <= 'B') goto yy31;
+			goto yy180;
+		} else {
+			if (yych <= 'Q') goto yy31;
+			if (yych <= 'R') goto yy178;
+			goto yy179;
+		}
+	} else {
+		if (yych <= 'q') {
+			if (yych == 'c') goto yy180;
+			goto yy31;
+		} else {
+			if (yych <= 'r') goto yy178;
+			if (yych <= 's') goto yy179;
+			goto yy31;
+		}
+	}
+yy169:
+	yych = *++p;
+	if (yych == 'M') goto yy177;
+	if (yych == 'm') goto yy177;
+	goto yy31;
+yy170:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'E') goto yy174;
+		if (yych <= 'O') goto yy31;
+		goto yy175;
+	} else {
+		if (yych <= 'e') {
+			if (yych <= 'd') goto yy31;
+			goto yy174;
+		} else {
+			if (yych == 'p') goto yy175;
+			goto yy31;
+		}
+	}
+yy171:
+	yych = *++p;
+	if (yych == 'T') goto yy172;
+	if (yych != 't') goto yy31;
+yy172:
+	yych = *++p;
+	if (yych == 'T') goto yy173;
+	if (yych != 't') goto yy31;
+yy173:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy174:
+	yych = *++p;
+	if (yych == 'V') goto yy176;
+	if (yych == 'v') goto yy176;
+	goto yy31;
+yy175:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy176:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy177:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy178:
+	yych = *++p;
+	if (yych == 'V') goto yy190;
+	if (yych == 'v') goto yy190;
+	goto yy31;
+yy179:
+	yych = *++p;
+	if (yych == 'S') goto yy187;
+	if (yych == 's') goto yy187;
+	goto yy31;
+yy180:
+	yych = *++p;
+	if (yych == 'O') goto yy181;
+	if (yych != 'o') goto yy31;
+yy181:
+	yych = *++p;
+	if (yych == 'N') goto yy182;
+	if (yych != 'n') goto yy31;
+yy182:
+	yych = *++p;
+	if (yych == 'D') goto yy183;
+	if (yych != 'd') goto yy31;
+yy183:
+	yych = *++p;
+	if (yych == 'L') goto yy184;
+	if (yych != 'l') goto yy31;
+yy184:
+	yych = *++p;
+	if (yych == 'I') goto yy185;
+	if (yych != 'i') goto yy31;
+yy185:
+	yych = *++p;
+	if (yych == 'F') goto yy186;
+	if (yych != 'f') goto yy31;
+yy186:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy187:
+	yych = *++p;
+	if (yych == 'I') goto yy188;
+	if (yych != 'i') goto yy31;
+yy188:
+	yych = *++p;
+	if (yych == 'O') goto yy189;
+	if (yych != 'o') goto yy31;
+yy189:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy190:
+	yych = *++p;
+	if (yych == 'I') goto yy191;
+	if (yych != 'i') goto yy31;
+yy191:
+	yych = *++p;
+	if (yych == 'C') goto yy192;
+	if (yych != 'c') goto yy31;
+yy192:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy193:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy194:
+	yych = *++p;
+	if (yych == 'P') goto yy195;
+	if (yych != 'p') goto yy31;
+yy195:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy196:
+	yych = *++p;
+	if (yych == 'P') goto yy200;
+	if (yych == 'p') goto yy200;
+	goto yy31;
+yy197:
+	yych = *++p;
+	if (yych == 'D') goto yy198;
+	if (yych != 'd') goto yy31;
+yy198:
+	yych = *++p;
+	if (yych == 'A') goto yy199;
+	if (yych != 'a') goto yy31;
+yy199:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy200:
+	yych = *++p;
+	if (yych != '.') goto yy31;
+	yych = *++p;
+	if (yych == 'B') goto yy202;
+	if (yych != 'b') goto yy31;
+yy202:
+	yych = *++p;
+	if (yych == 'E') goto yy203;
+	if (yych != 'e') goto yy31;
+yy203:
+	yych = *++p;
+	if (yych == 'E') goto yy204;
+	if (yych != 'e') goto yy31;
+yy204:
+	yych = *++p;
+	if (yych == 'P') goto yy205;
+	if (yych != 'p') goto yy31;
+yy205:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy206:
+	yych = *++p;
+	if (yych == 'T') goto yy207;
+	if (yych != 't') goto yy31;
+yy207:
+	yych = *++p;
+	if (yych == 'I') goto yy208;
+	if (yych != 'i') goto yy31;
+yy208:
+	yych = *++p;
+	if (yych == 'F') goto yy209;
+	if (yych != 'f') goto yy31;
+yy209:
+	yych = *++p;
+	if (yych == 'Y') goto yy34;
+	if (yych == 'y') goto yy34;
+	goto yy31;
+yy210:
+	yych = *++p;
+	if (yych == 'A') goto yy211;
+	if (yych != 'a') goto yy31;
+yy211:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy212:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych == 'M') goto yy224;
+		if (yych <= 'R') goto yy31;
+		goto yy223;
+	} else {
+		if (yych <= 'm') {
+			if (yych <= 'l') goto yy31;
+			goto yy224;
+		} else {
+			if (yych == 's') goto yy223;
+			goto yy31;
+		}
+	}
+yy213:
+	yych = *++p;
+	if (yych == 'Y') goto yy221;
+	if (yych == 'y') goto yy221;
+	goto yy31;
+yy214:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy215:
+	yych = *++p;
+	if (yych == 'S') goto yy216;
+	if (yych != 's') goto yy31;
+yy216:
+	yych = *++p;
+	if (yych <= 'N') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'O') goto yy217;
+		if (yych != 'o') goto yy31;
+	}
+yy217:
+	yych = *++p;
+	if (yych == 'U') goto yy218;
+	if (yych != 'u') goto yy31;
+yy218:
+	yych = *++p;
+	if (yych == 'R') goto yy219;
+	if (yych != 'r') goto yy31;
+yy219:
+	yych = *++p;
+	if (yych == 'C') goto yy220;
+	if (yych != 'c') goto yy31;
+yy220:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy221:
+	yych = *++p;
+	if (yych == 'N') goto yy222;
+	if (yych != 'n') goto yy31;
+yy222:
+	yych = *++p;
+	if (yych == 'C') goto yy34;
+	if (yych == 'c') goto yy34;
+	goto yy31;
+yy223:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy224:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy225:
+	yych = *++p;
+	if (yych == 'Y') goto yy245;
+	if (yych == 'y') goto yy245;
+	goto yy31;
+yy226:
+	yych = *++p;
+	if (yych <= 'O') {
+		if (yych == 'E') goto yy242;
+		if (yych <= 'N') goto yy31;
+		goto yy243;
+	} else {
+		if (yych <= 'e') {
+			if (yych <= 'd') goto yy31;
+			goto yy242;
+		} else {
+			if (yych == 'o') goto yy243;
+			goto yy31;
+		}
+	}
+yy227:
+	yych = *++p;
+	if (yych == 'A') goto yy237;
+	if (yych == 'a') goto yy237;
+	goto yy31;
+yy228:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'L') goto yy230;
+		if (yych <= 'O') goto yy31;
+		goto yy231;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy31;
+			goto yy230;
+		} else {
+			if (yych == 'p') goto yy231;
+			goto yy31;
+		}
+	}
+yy229:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy230:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy231:
+	yych = *++p;
+	if (yych == 'A') goto yy232;
+	if (yych != 'a') goto yy31;
+yy232:
+	yych = *++p;
+	if (yych == 'R') goto yy233;
+	if (yych != 'r') goto yy31;
+yy233:
+	yych = *++p;
+	if (yych == 'A') goto yy234;
+	if (yych != 'a') goto yy31;
+yy234:
+	yych = *++p;
+	if (yych == 'Z') goto yy235;
+	if (yych != 'z') goto yy31;
+yy235:
+	yych = *++p;
+	if (yych == 'Z') goto yy236;
+	if (yych != 'z') goto yy31;
+yy236:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy237:
+	yych = *++p;
+	if (yych == 'T') goto yy238;
+	if (yych != 't') goto yy31;
+yy238:
+	yych = *++p;
+	if (yych == 'F') goto yy239;
+	if (yych != 'f') goto yy31;
+yy239:
+	yych = *++p;
+	if (yych == 'O') goto yy240;
+	if (yych != 'o') goto yy31;
+yy240:
+	yych = *++p;
+	if (yych == 'R') goto yy241;
+	if (yych != 'r') goto yy31;
+yy241:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy242:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy243:
+	yych = *++p;
+	if (yych == 'X') goto yy244;
+	if (yych != 'x') goto yy31;
+yy244:
+	yych = *++p;
+	if (yych == 'Y') goto yy34;
+	if (yych == 'y') goto yy34;
+	goto yy31;
+yy245:
+	yych = *++p;
+	if (yych == 'C') goto yy34;
+	if (yych == 'c') goto yy34;
+	goto yy31;
+yy246:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy247:
+	yych = *++p;
+	if (yych == 'A') goto yy248;
+	if (yych != 'a') goto yy31;
+yy248:
+	yych = *++p;
+	if (yych == 'Q') goto yy249;
+	if (yych != 'q') goto yy31;
+yy249:
+	yych = *++p;
+	if (yych == 'U') goto yy250;
+	if (yych != 'u') goto yy31;
+yy250:
+	yych = *++p;
+	if (yych == 'E') goto yy251;
+	if (yych != 'e') goto yy31;
+yy251:
+	yych = *++p;
+	if (yych == 'L') goto yy252;
+	if (yych != 'l') goto yy31;
+yy252:
+	yych = *++p;
+	if (yych == 'O') goto yy253;
+	if (yych != 'o') goto yy31;
+yy253:
+	yych = *++p;
+	if (yych == 'C') goto yy254;
+	if (yych != 'c') goto yy31;
+yy254:
+	yych = *++p;
+	if (yych == 'K') goto yy255;
+	if (yych != 'k') goto yy31;
+yy255:
+	yych = *++p;
+	if (yych == 'T') goto yy256;
+	if (yych != 't') goto yy31;
+yy256:
+	yych = *++p;
+	if (yych == 'O') goto yy257;
+	if (yych != 'o') goto yy31;
+yy257:
+	yych = *++p;
+	if (yych == 'K') goto yy258;
+	if (yych != 'k') goto yy31;
+yy258:
+	yych = *++p;
+	if (yych == 'E') goto yy259;
+	if (yych != 'e') goto yy31;
+yy259:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy260:
+	yych = *++p;
+	if (yych == 'T') goto yy267;
+	if (yych == 't') goto yy267;
+	goto yy31;
+yy261:
+	yych = *++p;
+	if (yych == 'T') goto yy266;
+	if (yych == 't') goto yy266;
+	goto yy31;
+yy262:
+	yych = *++p;
+	if (yych <= 'G') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'H') goto yy34;
+		if (yych == 'h') goto yy34;
+		goto yy31;
+	}
+yy263:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy264:
+	yych = *++p;
+	if (yych == 'W') goto yy265;
+	if (yych != 'w') goto yy31;
+yy265:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy266:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy267:
+	yych = *++p;
+	if (yych == 'E') goto yy268;
+	if (yych != 'e') goto yy31;
+yy268:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy269:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy270:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'M') goto yy301;
+		if (yych <= 'O') goto yy31;
+		goto yy300;
+	} else {
+		if (yych <= 'm') {
+			if (yych <= 'l') goto yy31;
+			goto yy301;
+		} else {
+			if (yych == 'p') goto yy300;
+			goto yy31;
+		}
+	}
+yy271:
+	yych = *++p;
+	if (yych <= 'Q') {
+		if (yych <= '-') {
+			if (yych <= ',') goto yy31;
+			goto yy293;
+		} else {
+			if (yych == 'N') goto yy294;
+			goto yy31;
+		}
+	} else {
+		if (yych <= 'n') {
+			if (yych <= 'R') goto yy292;
+			if (yych <= 'm') goto yy31;
+			goto yy294;
+		} else {
+			if (yych == 'r') goto yy292;
+			goto yy31;
+		}
+	}
+yy272:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy273:
+	yych = *++p;
+	if (yych == 'S') goto yy288;
+	if (yych == 's') goto yy288;
+	goto yy31;
+yy274:
+	yych = *++p;
+	switch (yych) {
+	case 'G':
+	case 'g':	goto yy279;
+	case 'I':
+	case 'i':	goto yy278;
+	case 'P':
+	case 'p':	goto yy280;
+	case 'R':
+	case 'r':	goto yy281;
+	default:	goto yy31;
+	}
+yy275:
+	yych = *++p;
+	if (yych == 'Q') goto yy277;
+	if (yych == 'q') goto yy277;
+	goto yy31;
+yy276:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy277:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy278:
+	yych = *++p;
+	if (yych == 'L') goto yy286;
+	if (yych == 'l') goto yy286;
+	goto yy31;
+yy279:
+	yych = *++p;
+	if (yych == 'N') goto yy284;
+	if (yych == 'n') goto yy284;
+	goto yy31;
+yy280:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy281:
+	yych = *++p;
+	if (yych == 'K') goto yy282;
+	if (yych != 'k') goto yy31;
+yy282:
+	yych = *++p;
+	if (yych == 'E') goto yy283;
+	if (yych != 'e') goto yy31;
+yy283:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy284:
+	yych = *++p;
+	if (yych == 'E') goto yy285;
+	if (yych != 'e') goto yy31;
+yy285:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy286:
+	yych = *++p;
+	if (yych == 'T') goto yy287;
+	if (yych != 't') goto yy31;
+yy287:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy288:
+	yych = *++p;
+	if (yych == 'S') goto yy289;
+	if (yych != 's') goto yy31;
+yy289:
+	yych = *++p;
+	if (yych == 'A') goto yy290;
+	if (yych != 'a') goto yy31;
+yy290:
+	yych = *++p;
+	if (yych == 'G') goto yy291;
+	if (yych != 'g') goto yy31;
+yy291:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy292:
+	yych = *++p;
+	if (yych == 'P') goto yy299;
+	if (yych == 'p') goto yy299;
+	goto yy31;
+yy293:
+	yych = *++p;
+	if (yych == 'H') goto yy296;
+	if (yych == 'h') goto yy296;
+	goto yy31;
+yy294:
+	yych = *++p;
+	if (yych == 'I') goto yy295;
+	if (yych != 'i') goto yy31;
+yy295:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy296:
+	yych = *++p;
+	if (yych == 'E') goto yy297;
+	if (yych != 'e') goto yy31;
+yy297:
+	yych = *++p;
+	if (yych == 'L') goto yy298;
+	if (yych != 'l') goto yy31;
+yy298:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy299:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy300:
+	yych = *++p;
+	if (yych == 'D') goto yy304;
+	if (yych == 'd') goto yy304;
+	goto yy31;
+yy301:
+	yych = *++p;
+	if (yych == 'B') goto yy302;
+	if (yych != 'b') goto yy31;
+yy302:
+	yych = *++p;
+	if (yych == 'L') goto yy303;
+	if (yych != 'l') goto yy31;
+yy303:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy304:
+	yych = *++p;
+	if (yych == 'A') goto yy305;
+	if (yych != 'a') goto yy31;
+yy305:
+	yych = *++p;
+	if (yych == 'T') goto yy306;
+	if (yych != 't') goto yy31;
+yy306:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy307:
+	yych = *++p;
+	if (yych == 'A') goto yy312;
+	if (yych == 'a') goto yy312;
+	goto yy31;
+yy308:
+	yych = *++p;
+	if (yych == 'S') goto yy309;
+	if (yych != 's') goto yy31;
+yy309:
+	yych = *++p;
+	if (yych == 'T') goto yy310;
+	if (yych != 't') goto yy31;
+yy310:
+	yych = *++p;
+	if (yych == 'F') goto yy311;
+	if (yych != 'f') goto yy31;
+yy311:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy312:
+	yych = *++p;
+	if (yych == 'P') goto yy313;
+	if (yych != 'p') goto yy31;
+yy313:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy314:
+	yych = *++p;
+	if (yych == 'M') goto yy337;
+	if (yych == 'm') goto yy337;
+	goto yy31;
+yy315:
+	yych = *++p;
+	if (yych <= 'I') {
+		if (yych == 'C') goto yy326;
+		if (yych <= 'H') goto yy31;
+		goto yy325;
+	} else {
+		if (yych <= 'c') {
+			if (yych <= 'b') goto yy31;
+			goto yy326;
+		} else {
+			if (yych == 'i') goto yy325;
+			goto yy31;
+		}
+	}
+yy316:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'N') goto yy34;
+		if (yych <= 'O') goto yy31;
+		goto yy34;
+	} else {
+		if (yych <= 'n') {
+			if (yych <= 'm') goto yy31;
+			goto yy34;
+		} else {
+			if (yych == 'p') goto yy34;
+			goto yy31;
+		}
+	}
+yy317:
+	yych = *++p;
+	if (yych <= 'O') {
+		if (yych == 'A') goto yy323;
+		if (yych <= 'N') goto yy31;
+		goto yy324;
+	} else {
+		if (yych <= 'a') {
+			if (yych <= '`') goto yy31;
+			goto yy323;
+		} else {
+			if (yych == 'o') goto yy324;
+			goto yy31;
+		}
+	}
+yy318:
+	yych = *++p;
+	if (yych == 'F') goto yy322;
+	if (yych == 'f') goto yy322;
+	goto yy31;
+yy319:
+	yych = *++p;
+	if (yych <= '@') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'A') goto yy321;
+		if (yych == 'a') goto yy321;
+		goto yy31;
+	}
+yy320:
+	yych = *++p;
+	if (yych == 'X') goto yy34;
+	if (yych == 'x') goto yy34;
+	goto yy31;
+yy321:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy322:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy323:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy324:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy325:
+	yych = *++p;
+	if (yych == 'S') goto yy327;
+	if (yych == 's') goto yy327;
+	goto yy31;
+yy326:
+	yych = *++p;
+	if (yych <= ':') {
+		if (yych == '6') goto yy34;
+		if (yych <= '9') goto yy31;
+		goto yy35;
+	} else {
+		if (yych <= 'S') {
+			if (yych <= 'R') goto yy31;
+			goto yy34;
+		} else {
+			if (yych == 's') goto yy34;
+			goto yy31;
+		}
+	}
+yy327:
+	yych = *++p;
+	if (yych == '.') goto yy328;
+	if (yych == ':') goto yy35;
+	goto yy31;
+yy328:
+	yych = *++p;
+	if (yych <= 'X') {
+		if (yych <= 'K') {
+			if (yych == 'B') goto yy331;
+			goto yy31;
+		} else {
+			if (yych <= 'L') goto yy329;
+			if (yych <= 'W') goto yy31;
+			goto yy330;
+		}
+	} else {
+		if (yych <= 'k') {
+			if (yych == 'b') goto yy331;
+			goto yy31;
+		} else {
+			if (yych <= 'l') goto yy329;
+			if (yych == 'x') goto yy330;
+			goto yy31;
+		}
+	}
+yy329:
+	yych = *++p;
+	if (yych == 'W') goto yy336;
+	if (yych == 'w') goto yy336;
+	goto yy31;
+yy330:
+	yych = *++p;
+	if (yych == 'P') goto yy334;
+	if (yych == 'p') goto yy334;
+	goto yy31;
+yy331:
+	yych = *++p;
+	if (yych == 'E') goto yy332;
+	if (yych != 'e') goto yy31;
+yy332:
+	yych = *++p;
+	if (yych == 'E') goto yy333;
+	if (yych != 'e') goto yy31;
+yy333:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy334:
+	yych = *++p;
+	if (yych == 'C') goto yy335;
+	if (yych != 'c') goto yy31;
+yy335:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy336:
+	yych = *++p;
+	if (yych == 'Z') goto yy34;
+	if (yych == 'z') goto yy34;
+	goto yy31;
+yy337:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy338:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy339:
+	yych = *++p;
+	if (yych == 'T') goto yy342;
+	if (yych == 't') goto yy342;
+	goto yy31;
+yy340:
+	yych = *++p;
+	if (yych != '2') goto yy31;
+	yych = *++p;
+	if (yych == '3') goto yy34;
+	goto yy31;
+yy342:
+	yych = *++p;
+	if (yych == 'P') goto yy343;
+	if (yych != 'p') goto yy31;
+yy343:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy344:
+	yych = *++p;
+	if (yych == 'A') goto yy360;
+	if (yych == 'a') goto yy360;
+	goto yy31;
+yy345:
+	yych = *++p;
+	if (yych <= 'Z') {
+		if (yych == 'T') goto yy34;
+		if (yych <= 'Y') goto yy31;
+		goto yy351;
+	} else {
+		if (yych <= 't') {
+			if (yych <= 's') goto yy31;
+			goto yy34;
+		} else {
+			if (yych == 'z') goto yy351;
+			goto yy31;
+		}
+	}
+yy346:
+	yych = *++p;
+	if (yych <= 'O') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'P') goto yy348;
+		if (yych == 'p') goto yy348;
+		goto yy31;
+	}
+yy347:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy348:
+	yych = *++p;
+	if (yych == 'H') goto yy349;
+	if (yych != 'h') goto yy31;
+yy349:
+	yych = *++p;
+	if (yych == 'E') goto yy350;
+	if (yych != 'e') goto yy31;
+yy350:
+	yych = *++p;
+	if (yych == 'R') goto yy34;
+	if (yych == 'r') goto yy34;
+	goto yy31;
+yy351:
+	yych = *++p;
+	if (yych == 'M') goto yy352;
+	if (yych != 'm') goto yy31;
+yy352:
+	yych = *++p;
+	if (yych == 'O') goto yy353;
+	if (yych != 'o') goto yy31;
+yy353:
+	yych = *++p;
+	if (yych == 'P') goto yy354;
+	if (yych != 'p') goto yy31;
+yy354:
+	yych = *++p;
+	if (yych == 'R') goto yy355;
+	if (yych != 'r') goto yy31;
+yy355:
+	yych = *++p;
+	if (yych == 'O') goto yy356;
+	if (yych != 'o') goto yy31;
+yy356:
+	yych = *++p;
+	if (yych == 'J') goto yy357;
+	if (yych != 'j') goto yy31;
+yy357:
+	yych = *++p;
+	if (yych == 'E') goto yy358;
+	if (yych != 'e') goto yy31;
+yy358:
+	yych = *++p;
+	if (yych == 'C') goto yy359;
+	if (yych != 'c') goto yy31;
+yy359:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy360:
+	yych = *++p;
+	if (yych == 'L') goto yy361;
+	if (yych != 'l') goto yy31;
+yy361:
+	yych = *++p;
+	if (yych == 'K') goto yy34;
+	if (yych == 'k') goto yy34;
+	goto yy31;
+yy362:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych <= 'M') {
+			if (yych == 'L') goto yy372;
+			goto yy31;
+		} else {
+			if (yych <= 'N') goto yy373;
+			if (yych <= 'R') goto yy31;
+			goto yy374;
+		}
+	} else {
+		if (yych <= 'm') {
+			if (yych == 'l') goto yy372;
+			goto yy31;
+		} else {
+			if (yych <= 'n') goto yy373;
+			if (yych == 's') goto yy374;
+			goto yy31;
+		}
+	}
+yy363:
+	yych = *++p;
+	if (yych == 'E') goto yy371;
+	if (yych == 'e') goto yy371;
+	goto yy31;
+yy364:
+	yych = *++p;
+	if (yych == 'C') goto yy366;
+	if (yych == 'c') goto yy366;
+	goto yy31;
+yy365:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy366:
+	yych = *++p;
+	if (yych == 'E') goto yy367;
+	if (yych != 'e') goto yy31;
+yy367:
+	yych = *++p;
+	if (yych == 'T') goto yy368;
+	if (yych != 't') goto yy31;
+yy368:
+	yych = *++p;
+	if (yych == 'I') goto yy369;
+	if (yych != 'i') goto yy31;
+yy369:
+	yych = *++p;
+	if (yych == 'M') goto yy370;
+	if (yych != 'm') goto yy31;
+yy370:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy371:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy372:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy373:
+	yych = *++p;
+	if (yych == 'G') goto yy375;
+	if (yych == 'g') goto yy375;
+	goto yy31;
+yy374:
+	yych = *++p;
+	if (yych == 'H') goto yy34;
+	if (yych == 'h') goto yy34;
+	goto yy31;
+yy375:
+	yych = *++p;
+	if (yych == 'E') goto yy376;
+	if (yych != 'e') goto yy31;
+yy376:
+	yych = *++p;
+	if (yych == 'R') goto yy34;
+	if (yych == 'r') goto yy34;
+	goto yy31;
+yy377:
+	yych = *++p;
+	if (yych == 'T') goto yy395;
+	if (yych == 't') goto yy395;
+	goto yy31;
+yy378:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy379:
+	yych = *++p;
+	if (yych == 'M') goto yy34;
+	if (yych == 'm') goto yy34;
+	goto yy31;
+yy380:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych == 'P') goto yy34;
+		if (yych <= 'R') goto yy31;
+		goto yy34;
+	} else {
+		if (yych <= 'p') {
+			if (yych <= 'o') goto yy31;
+			goto yy34;
+		} else {
+			if (yych == 's') goto yy34;
+			goto yy31;
+		}
+	}
+yy381:
+	yych = *++p;
+	if (yych == 'I') goto yy389;
+	if (yych == 'i') goto yy389;
+	goto yy31;
+yy382:
+	yych = *++p;
+	if (yych == 'A') goto yy388;
+	if (yych == 'a') goto yy388;
+	goto yy31;
+yy383:
+	yych = *++p;
+	if (yych == 'O') goto yy386;
+	if (yych == 'o') goto yy386;
+	goto yy31;
+yy384:
+	yych = *++p;
+	if (yych == 'A') goto yy385;
+	if (yych != 'a') goto yy31;
+yy385:
+	yych = *++p;
+	if (yych <= 'R') {
+		if (yych == ':') goto yy35;
+		goto yy31;
+	} else {
+		if (yych <= 'S') goto yy34;
+		if (yych == 's') goto yy34;
+		goto yy31;
+	}
+yy386:
+	yych = *++p;
+	if (yych == 'U') goto yy387;
+	if (yych != 'u') goto yy31;
+yy387:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy388:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy389:
+	yych = *++p;
+	if (yych == 'U') goto yy390;
+	if (yych != 'u') goto yy31;
+yy390:
+	yych = *++p;
+	if (yych == 'M') goto yy391;
+	if (yych != 'm') goto yy31;
+yy391:
+	yych = *++p;
+	if (yych == 'X') goto yy392;
+	if (yych != 'x') goto yy31;
+yy392:
+	yych = *++p;
+	if (yych == 'T') goto yy393;
+	if (yych != 't') goto yy31;
+yy393:
+	yych = *++p;
+	if (yych == 'R') goto yy394;
+	if (yych != 'r') goto yy31;
+yy394:
+	yych = *++p;
+	if (yych == 'A') goto yy34;
+	if (yych == 'a') goto yy34;
+	goto yy31;
+yy395:
+	yych = *++p;
+	if (yych == 'A') goto yy396;
+	if (yych != 'a') goto yy31;
+yy396:
+	yych = *++p;
+	if (yych == 'C') goto yy397;
+	if (yych != 'c') goto yy31;
+yy397:
+	yych = *++p;
+	if (yych == 'H') goto yy398;
+	if (yych != 'h') goto yy31;
+yy398:
+	yych = *++p;
+	if (yych == 'M') goto yy399;
+	if (yych != 'm') goto yy31;
+yy399:
+	yych = *++p;
+	if (yych == 'E') goto yy400;
+	if (yych != 'e') goto yy31;
+yy400:
+	yych = *++p;
+	if (yych == 'N') goto yy401;
+	if (yych != 'n') goto yy31;
+yy401:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy402:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy403:
+	yych = *++p;
+	if (yych <= 'V') {
+		if (yych == 'R') goto yy34;
+		if (yych <= 'U') goto yy31;
+	} else {
+		if (yych <= 'r') {
+			if (yych <= 'q') goto yy31;
+			goto yy34;
+		} else {
+			if (yych != 'v') goto yy31;
+		}
+	}
+	yych = *++p;
+	if (yych == 'A') goto yy405;
+	if (yych != 'a') goto yy31;
+yy405:
+	yych = *++p;
+	if (yych == 'S') goto yy406;
+	if (yych != 's') goto yy31;
+yy406:
+	yych = *++p;
+	if (yych == 'C') goto yy407;
+	if (yych != 'c') goto yy31;
+yy407:
+	yych = *++p;
+	if (yych == 'R') goto yy408;
+	if (yych != 'r') goto yy31;
+yy408:
+	yych = *++p;
+	if (yych == 'I') goto yy409;
+	if (yych != 'i') goto yy31;
+yy409:
+	yych = *++p;
+	if (yych == 'P') goto yy410;
+	if (yych != 'p') goto yy31;
+yy410:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy411:
+	yych = *++p;
+	if (yych == 'B') goto yy34;
+	if (yych == 'b') goto yy34;
+	goto yy31;
+yy412:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy413:
+	yych = *++p;
+	if (yych == 'N') goto yy420;
+	if (yych == 'n') goto yy420;
+	goto yy31;
+yy414:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy415:
+	yych = *++p;
+	if (yych == 'C') goto yy419;
+	if (yych == 'c') goto yy419;
+	goto yy31;
+yy416:
+	yych = *++p;
+	if (yych <= 'V') {
+		if (yych == 'T') goto yy418;
+		if (yych <= 'U') goto yy31;
+		goto yy34;
+	} else {
+		if (yych <= 't') {
+			if (yych <= 's') goto yy31;
+			goto yy418;
+		} else {
+			if (yych == 'v') goto yy34;
+			goto yy31;
+		}
+	}
+yy417:
+	yych = *++p;
+	if (yych == 'I') goto yy34;
+	if (yych == 'i') goto yy34;
+	goto yy31;
+yy418:
+	yych = *++p;
+	if (yych == 'A') goto yy34;
+	if (yych == 'a') goto yy34;
+	goto yy31;
+yy419:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy420:
+	yych = *++p;
+	if (yych == 'A') goto yy421;
+	if (yych != 'a') goto yy31;
+yy421:
+	yych = *++p;
+	if (yych != '-') goto yy31;
+	yych = *++p;
+	if (yych == 'P') goto yy423;
+	if (yych != 'p') goto yy31;
+yy423:
+	yych = *++p;
+	if (yych == 'L') goto yy424;
+	if (yych != 'l') goto yy31;
+yy424:
+	yych = *++p;
+	if (yych == 'A') goto yy425;
+	if (yych != 'a') goto yy31;
+yy425:
+	yych = *++p;
+	if (yych == 'Y') goto yy426;
+	if (yych != 'y') goto yy31;
+yy426:
+	yych = *++p;
+	if (yych <= 'S') {
+		if (yych == 'C') goto yy427;
+		if (yych <= 'R') goto yy31;
+		goto yy428;
+	} else {
+		if (yych <= 'c') {
+			if (yych <= 'b') goto yy31;
+		} else {
+			if (yych == 's') goto yy428;
+			goto yy31;
+		}
+	}
+yy427:
+	yych = *++p;
+	if (yych == 'O') goto yy433;
+	if (yych == 'o') goto yy433;
+	goto yy31;
+yy428:
+	yych = *++p;
+	if (yych == 'I') goto yy429;
+	if (yych != 'i') goto yy31;
+yy429:
+	yych = *++p;
+	if (yych == 'N') goto yy430;
+	if (yych != 'n') goto yy31;
+yy430:
+	yych = *++p;
+	if (yych == 'G') goto yy431;
+	if (yych != 'g') goto yy31;
+yy431:
+	yych = *++p;
+	if (yych == 'L') goto yy432;
+	if (yych != 'l') goto yy31;
+yy432:
+	yych = *++p;
+	if (yych == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+yy433:
+	yych = *++p;
+	if (yych == 'N') goto yy434;
+	if (yych != 'n') goto yy31;
+yy434:
+	yych = *++p;
+	if (yych == 'T') goto yy435;
+	if (yych != 't') goto yy31;
+yy435:
+	yych = *++p;
+	if (yych == 'A') goto yy436;
+	if (yych != 'a') goto yy31;
+yy436:
+	yych = *++p;
+	if (yych == 'I') goto yy437;
+	if (yych != 'i') goto yy31;
+yy437:
+	yych = *++p;
+	if (yych == 'N') goto yy438;
+	if (yych != 'n') goto yy31;
+yy438:
+	yych = *++p;
+	if (yych == 'E') goto yy439;
+	if (yych != 'e') goto yy31;
+yy439:
+	yych = *++p;
+	if (yych == 'R') goto yy34;
+	if (yych == 'r') goto yy34;
+	goto yy31;
+yy440:
+	yych = *++p;
+	if (yych == 'S') goto yy34;
+	if (yych == 's') goto yy34;
+	goto yy31;
+yy441:
+	yych = *++p;
+	if (yych <= 'N') {
+		if (yych <= 'A') {
+			if (yych <= '@') goto yy31;
+			goto yy463;
+		} else {
+			if (yych <= 'L') goto yy31;
+			if (yych <= 'M') goto yy464;
+			goto yy465;
+		}
+	} else {
+		if (yych <= 'l') {
+			if (yych == 'a') goto yy463;
+			goto yy31;
+		} else {
+			if (yych <= 'm') goto yy464;
+			if (yych <= 'n') goto yy465;
+			goto yy31;
+		}
+	}
+yy442:
+	yych = *++p;
+	if (yych == 'R') goto yy450;
+	if (yych == 'r') goto yy450;
+	goto yy31;
+yy443:
+	yych = *++p;
+	if (yych <= 'P') {
+		if (yych == 'L') goto yy447;
+		if (yych <= 'O') goto yy31;
+		goto yy34;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy31;
+			goto yy447;
+		} else {
+			if (yych == 'p') goto yy34;
+			goto yy31;
+		}
+	}
+yy444:
+	yych = *++p;
+	if (yych == 'I') goto yy446;
+	if (yych == 'i') goto yy446;
+	goto yy31;
+yy445:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy446:
+	yych = *++p;
+	if (yych == 'D') goto yy34;
+	if (yych == 'd') goto yy34;
+	goto yy31;
+yy447:
+	yych = *++p;
+	if (yych == 'L') goto yy448;
+	if (yych != 'l') goto yy31;
+yy448:
+	yych = *++p;
+	if (yych == 'T') goto yy449;
+	if (yych != 't') goto yy31;
+yy449:
+	yych = *++p;
+	if (yych == 'O') goto yy34;
+	if (yych == 'o') goto yy34;
+	goto yy31;
+yy450:
+	yych = *++p;
+	if (yych == 'O') goto yy451;
+	if (yych != 'o') goto yy31;
+yy451:
+	yych = *++p;
+	if (yych == 'M') goto yy452;
+	if (yych != 'm') goto yy31;
+yy452:
+	yych = *++p;
+	if (yych == 'E') goto yy453;
+	if (yych != 'e') goto yy31;
+yy453:
+	yych = *++p;
+	if (yych == '-') goto yy454;
+	if (yych == ':') goto yy35;
+	goto yy31;
+yy454:
+	yych = *++p;
+	if (yych == 'E') goto yy455;
+	if (yych != 'e') goto yy31;
+yy455:
+	yych = *++p;
+	if (yych == 'X') goto yy456;
+	if (yych != 'x') goto yy31;
+yy456:
+	yych = *++p;
+	if (yych == 'T') goto yy457;
+	if (yych != 't') goto yy31;
+yy457:
+	yych = *++p;
+	if (yych == 'E') goto yy458;
+	if (yych != 'e') goto yy31;
+yy458:
+	yych = *++p;
+	if (yych == 'N') goto yy459;
+	if (yych != 'n') goto yy31;
+yy459:
+	yych = *++p;
+	if (yych == 'S') goto yy460;
+	if (yych != 's') goto yy31;
+yy460:
+	yych = *++p;
+	if (yych == 'I') goto yy461;
+	if (yych != 'i') goto yy31;
+yy461:
+	yych = *++p;
+	if (yych == 'O') goto yy462;
+	if (yych != 'o') goto yy31;
+yy462:
+	yych = *++p;
+	if (yych == 'N') goto yy34;
+	if (yych == 'n') goto yy34;
+	goto yy31;
+yy463:
+	yych = *++p;
+	if (yych == 'P') goto yy34;
+	if (yych == 'p') goto yy34;
+	goto yy31;
+yy464:
+	yych = *++p;
+	if (yych == '-') goto yy469;
+	goto yy31;
+yy465:
+	yych = *++p;
+	if (yych == 'T') goto yy466;
+	if (yych != 't') goto yy31;
+yy466:
+	yych = *++p;
+	if (yych == 'E') goto yy467;
+	if (yych != 'e') goto yy31;
+yy467:
+	yych = *++p;
+	if (yych == 'N') goto yy468;
+	if (yych != 'n') goto yy31;
+yy468:
+	yych = *++p;
+	if (yych == 'T') goto yy34;
+	if (yych == 't') goto yy34;
+	goto yy31;
+yy469:
+	yych = *++p;
+	if (yych == 'E') goto yy470;
+	if (yych != 'e') goto yy31;
+yy470:
+	yych = *++p;
+	if (yych == 'V') goto yy471;
+	if (yych != 'v') goto yy31;
+yy471:
+	yych = *++p;
+	if (yych == 'E') goto yy472;
+	if (yych != 'e') goto yy31;
+yy472:
+	yych = *++p;
+	if (yych == 'N') goto yy473;
+	if (yych != 'n') goto yy31;
+yy473:
+	yych = *++p;
+	if (yych == 'T') goto yy474;
+	if (yych != 't') goto yy31;
+yy474:
+	yych = *++p;
+	if (yych == 'B') goto yy475;
+	if (yych != 'b') goto yy31;
+yy475:
+	yych = *++p;
+	if (yych == 'R') goto yy476;
+	if (yych != 'r') goto yy31;
+yy476:
+	yych = *++p;
+	if (yych == 'I') goto yy477;
+	if (yych != 'i') goto yy31;
+yy477:
+	yych = *++p;
+	if (yych == 'T') goto yy478;
+	if (yych != 't') goto yy31;
+yy478:
+	yych = *++p;
+	if (yych == 'E') goto yy479;
+	if (yych != 'e') goto yy31;
+yy479:
+	yych = *++p;
+	if (yych != '-') goto yy31;
+	yych = *++p;
+	if (yych == 'A') goto yy481;
+	if (yych != 'a') goto yy31;
+yy481:
+	yych = *++p;
+	if (yych == 'T') goto yy482;
+	if (yych != 't') goto yy31;
+yy482:
+	yych = *++p;
+	if (yych == 'T') goto yy483;
+	if (yych != 't') goto yy31;
+yy483:
+	yych = *++p;
+	if (yych == 'E') goto yy484;
+	if (yych != 'e') goto yy31;
+yy484:
+	yych = *++p;
+	if (yych == 'N') goto yy485;
+	if (yych != 'n') goto yy31;
+yy485:
+	yych = *++p;
+	if (yych == 'D') goto yy486;
+	if (yych != 'd') goto yy31;
+yy486:
+	yych = *++p;
+	if (yych == 'E') goto yy487;
+	if (yych != 'e') goto yy31;
+yy487:
+	++p;
+	if ((yych = *p) == 'E') goto yy34;
+	if (yych == 'e') goto yy34;
+	goto yy31;
+}
+
+}
+
+// Try to match email autolink after first <, returning num of chars matched.
+int _scan_autolink_email(const unsigned char *p)
+{
+  const unsigned char *marker = NULL;
+  const unsigned char *start = p;
+
+{
+	unsigned char yych;
+	static const unsigned char yybm[] = {
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0, 128,   0, 128, 128, 128, 128, 128, 
+		  0,   0, 128, 128,   0, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128,   0,   0,   0, 128,   0, 128, 
+		  0, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128,   0,   0,   0, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128, 128, 
+		128, 128, 128, 128, 128, 128, 128,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+		  0,   0,   0,   0,   0,   0,   0,   0, 
+	};
+	yych = *p;
+	if (yych <= ',') {
+		if (yych <= '!') {
+			if (yych == '\n') goto yy490;
+			if (yych <= ' ') goto yy492;
+			goto yy491;
+		} else {
+			if (yych <= '\'') {
+				if (yych <= '"') goto yy492;
+				goto yy491;
+			} else {
+				if (yych <= ')') goto yy492;
+				if (yych <= '+') goto yy491;
+				goto yy492;
+			}
+		}
+	} else {
+		if (yych <= '?') {
+			if (yych <= '<') {
+				if (yych <= '9') goto yy491;
+				goto yy492;
+			} else {
+				if (yych == '>') goto yy492;
+				goto yy491;
+			}
+		} else {
+			if (yych <= 'Z') {
+				if (yych <= '@') goto yy492;
+				goto yy491;
+			} else {
+				if (yych <= ']') goto yy492;
+				if (yych <= '~') goto yy491;
+				goto yy492;
+			}
+		}
+	}
+yy490:
+	{ return 0; }
+yy491:
+	yych = *(marker = ++p);
+	if (yych <= ',') {
+		if (yych <= '"') {
+			if (yych == '!') goto yy496;
+			goto yy490;
+		} else {
+			if (yych <= '\'') goto yy496;
+			if (yych <= ')') goto yy490;
+			if (yych <= '+') goto yy496;
+			goto yy490;
+		}
+	} else {
+		if (yych <= '>') {
+			if (yych <= '9') goto yy496;
+			if (yych == '=') goto yy496;
+			goto yy490;
+		} else {
+			if (yych <= 'Z') goto yy496;
+			if (yych <= ']') goto yy490;
+			if (yych <= '~') goto yy496;
+			goto yy490;
+		}
+	}
+yy492:
+	yych = *++p;
+	goto yy490;
+yy493:
+	yych = *++p;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy494;
+		if (yych <= '9') goto yy497;
+	} else {
+		if (yych <= 'Z') goto yy497;
+		if (yych <= '`') goto yy494;
+		if (yych <= 'z') goto yy497;
+	}
+yy494:
+	p = marker;
+	goto yy490;
+yy495:
+	++p;
+	yych = *p;
+yy496:
+	if (yybm[0+yych] & 128) {
+		goto yy495;
+	}
+	if (yych == '@') goto yy493;
+	goto yy494;
+yy497:
+	yych = *++p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy499;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy499;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy499;
+			goto yy494;
+		}
+	}
+	yych = *++p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy627;
+		if (yych <= '/') goto yy494;
+		goto yy628;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy628;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy628;
+			goto yy494;
+		}
+	}
+yy499:
+	yych = *++p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych <= '-') goto yy627;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy628;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy628;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy628;
+			goto yy494;
+		}
+	}
+yy500:
+	++p;
+	yych = *p;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy494;
+		if (yych <= '9') goto yy503;
+		goto yy494;
+	} else {
+		if (yych <= 'Z') goto yy503;
+		if (yych <= '`') goto yy494;
+		if (yych <= 'z') goto yy503;
+		goto yy494;
+	}
+yy501:
+	++p;
+	{ return (p - start); }
+yy503:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy505;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy505;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy505;
+			goto yy494;
+		}
+	}
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy506;
+		if (yych <= '/') goto yy494;
+		goto yy507;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy507;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy507;
+			goto yy494;
+		}
+	}
+yy505:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy507;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy507;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy507;
+			goto yy494;
+		}
+	}
+yy506:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy508;
+		if (yych <= '/') goto yy494;
+		goto yy509;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy509;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy509;
+			goto yy494;
+		}
+	}
+yy507:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy509;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy509;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy509;
+			goto yy494;
+		}
+	}
+yy508:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy510;
+		if (yych <= '/') goto yy494;
+		goto yy511;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy511;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy511;
+			goto yy494;
+		}
+	}
+yy509:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy511;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy511;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy511;
+			goto yy494;
+		}
+	}
+yy510:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy512;
+		if (yych <= '/') goto yy494;
+		goto yy513;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy513;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy513;
+			goto yy494;
+		}
+	}
+yy511:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy513;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy513;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy513;
+			goto yy494;
+		}
+	}
+yy512:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy514;
+		if (yych <= '/') goto yy494;
+		goto yy515;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy515;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy515;
+			goto yy494;
+		}
+	}
+yy513:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy515;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy515;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy515;
+			goto yy494;
+		}
+	}
+yy514:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy516;
+		if (yych <= '/') goto yy494;
+		goto yy517;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy517;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy517;
+			goto yy494;
+		}
+	}
+yy515:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy517;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy517;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy517;
+			goto yy494;
+		}
+	}
+yy516:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy518;
+		if (yych <= '/') goto yy494;
+		goto yy519;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy519;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy519;
+			goto yy494;
+		}
+	}
+yy517:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy519;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy519;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy519;
+			goto yy494;
+		}
+	}
+yy518:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy520;
+		if (yych <= '/') goto yy494;
+		goto yy521;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy521;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy521;
+			goto yy494;
+		}
+	}
+yy519:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy521;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy521;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy521;
+			goto yy494;
+		}
+	}
+yy520:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy522;
+		if (yych <= '/') goto yy494;
+		goto yy523;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy523;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy523;
+			goto yy494;
+		}
+	}
+yy521:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy523;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy523;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy523;
+			goto yy494;
+		}
+	}
+yy522:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy524;
+		if (yych <= '/') goto yy494;
+		goto yy525;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy525;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy525;
+			goto yy494;
+		}
+	}
+yy523:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy525;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy525;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy525;
+			goto yy494;
+		}
+	}
+yy524:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy526;
+		if (yych <= '/') goto yy494;
+		goto yy527;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy527;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy527;
+			goto yy494;
+		}
+	}
+yy525:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy527;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy527;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy527;
+			goto yy494;
+		}
+	}
+yy526:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy528;
+		if (yych <= '/') goto yy494;
+		goto yy529;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy529;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy529;
+			goto yy494;
+		}
+	}
+yy527:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy529;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy529;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy529;
+			goto yy494;
+		}
+	}
+yy528:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy530;
+		if (yych <= '/') goto yy494;
+		goto yy531;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy531;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy531;
+			goto yy494;
+		}
+	}
+yy529:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy531;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy531;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy531;
+			goto yy494;
+		}
+	}
+yy530:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy532;
+		if (yych <= '/') goto yy494;
+		goto yy533;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy533;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy533;
+			goto yy494;
+		}
+	}
+yy531:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy533;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy533;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy533;
+			goto yy494;
+		}
+	}
+yy532:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy534;
+		if (yych <= '/') goto yy494;
+		goto yy535;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy535;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy535;
+			goto yy494;
+		}
+	}
+yy533:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy535;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy535;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy535;
+			goto yy494;
+		}
+	}
+yy534:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy536;
+		if (yych <= '/') goto yy494;
+		goto yy537;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy537;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy537;
+			goto yy494;
+		}
+	}
+yy535:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy537;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy537;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy537;
+			goto yy494;
+		}
+	}
+yy536:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy538;
+		if (yych <= '/') goto yy494;
+		goto yy539;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy539;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy539;
+			goto yy494;
+		}
+	}
+yy537:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy539;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy539;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy539;
+			goto yy494;
+		}
+	}
+yy538:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy540;
+		if (yych <= '/') goto yy494;
+		goto yy541;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy541;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy541;
+			goto yy494;
+		}
+	}
+yy539:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy541;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy541;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy541;
+			goto yy494;
+		}
+	}
+yy540:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy542;
+		if (yych <= '/') goto yy494;
+		goto yy543;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy543;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy543;
+			goto yy494;
+		}
+	}
+yy541:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy543;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy543;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy543;
+			goto yy494;
+		}
+	}
+yy542:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy544;
+		if (yych <= '/') goto yy494;
+		goto yy545;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy545;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy545;
+			goto yy494;
+		}
+	}
+yy543:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy545;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy545;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy545;
+			goto yy494;
+		}
+	}
+yy544:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy546;
+		if (yych <= '/') goto yy494;
+		goto yy547;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy547;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy547;
+			goto yy494;
+		}
+	}
+yy545:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy547;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy547;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy547;
+			goto yy494;
+		}
+	}
+yy546:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy548;
+		if (yych <= '/') goto yy494;
+		goto yy549;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy549;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy549;
+			goto yy494;
+		}
+	}
+yy547:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy549;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy549;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy549;
+			goto yy494;
+		}
+	}
+yy548:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy550;
+		if (yych <= '/') goto yy494;
+		goto yy551;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy551;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy551;
+			goto yy494;
+		}
+	}
+yy549:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy551;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy551;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy551;
+			goto yy494;
+		}
+	}
+yy550:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy552;
+		if (yych <= '/') goto yy494;
+		goto yy553;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy553;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy553;
+			goto yy494;
+		}
+	}
+yy551:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy553;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy553;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy553;
+			goto yy494;
+		}
+	}
+yy552:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy554;
+		if (yych <= '/') goto yy494;
+		goto yy555;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy555;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy555;
+			goto yy494;
+		}
+	}
+yy553:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy555;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy555;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy555;
+			goto yy494;
+		}
+	}
+yy554:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy556;
+		if (yych <= '/') goto yy494;
+		goto yy557;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy557;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy557;
+			goto yy494;
+		}
+	}
+yy555:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy557;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy557;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy557;
+			goto yy494;
+		}
+	}
+yy556:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy558;
+		if (yych <= '/') goto yy494;
+		goto yy559;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy559;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy559;
+			goto yy494;
+		}
+	}
+yy557:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy559;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy559;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy559;
+			goto yy494;
+		}
+	}
+yy558:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy560;
+		if (yych <= '/') goto yy494;
+		goto yy561;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy561;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy561;
+			goto yy494;
+		}
+	}
+yy559:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy561;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy561;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy561;
+			goto yy494;
+		}
+	}
+yy560:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy562;
+		if (yych <= '/') goto yy494;
+		goto yy563;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy563;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy563;
+			goto yy494;
+		}
+	}
+yy561:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy563;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy563;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy563;
+			goto yy494;
+		}
+	}
+yy562:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy564;
+		if (yych <= '/') goto yy494;
+		goto yy565;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy565;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy565;
+			goto yy494;
+		}
+	}
+yy563:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy565;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy565;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy565;
+			goto yy494;
+		}
+	}
+yy564:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy566;
+		if (yych <= '/') goto yy494;
+		goto yy567;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy567;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy567;
+			goto yy494;
+		}
+	}
+yy565:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy567;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy567;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy567;
+			goto yy494;
+		}
+	}
+yy566:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy568;
+		if (yych <= '/') goto yy494;
+		goto yy569;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy569;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy569;
+			goto yy494;
+		}
+	}
+yy567:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy569;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy569;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy569;
+			goto yy494;
+		}
+	}
+yy568:
+	++p;
+	yych = *p;
+	if (yych <= '9') {
+		if (yych == '-') goto yy570;
+		if (yych <= '/') goto yy494;
+		goto yy571;
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '@') goto yy494;
+			goto yy571;
+		} else {
+			if (yych <= '`') goto yy494;
+			if (yych <= 'z') goto yy571;
+			goto yy494;
+		}
+	}
+yy569:
+	++p;
+	yych = *p;
+	if (yych <= '=') {
+		if (yych <= '.') {
+			if (yych <= ',') goto yy494;
+			if (yych >= '.') goto yy500;
+		} else {
+			if (yych <= '/') goto yy494;
+			if (yych <= '9') goto yy571;
+			goto yy494;
+		}
+	} else {
+		if (yych <= 'Z') {
+			if (yych <= '>') goto yy501;
+			if (yych <= '@') goto yy494;
+			goto yy571;
+		} else {
+			if (yyc

<TRUNCATED>

[11/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/case_fold_switch.inc
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/case_fold_switch.inc b/compiler/modules/CommonMark/src/case_fold_switch.inc
new file mode 100644
index 0000000..70fdd75
--- /dev/null
+++ b/compiler/modules/CommonMark/src/case_fold_switch.inc
@@ -0,0 +1,2637 @@
+    switch (c) {
+      case 0x0041:
+        bufpush(0x0061);
+        break;
+      case 0x0042:
+        bufpush(0x0062);
+        break;
+      case 0x0043:
+        bufpush(0x0063);
+        break;
+      case 0x0044:
+        bufpush(0x0064);
+        break;
+      case 0x0045:
+        bufpush(0x0065);
+        break;
+      case 0x0046:
+        bufpush(0x0066);
+        break;
+      case 0x0047:
+        bufpush(0x0067);
+        break;
+      case 0x0048:
+        bufpush(0x0068);
+        break;
+      case 0x0049:
+        bufpush(0x0069);
+        break;
+      case 0x004A:
+        bufpush(0x006A);
+        break;
+      case 0x004B:
+        bufpush(0x006B);
+        break;
+      case 0x004C:
+        bufpush(0x006C);
+        break;
+      case 0x004D:
+        bufpush(0x006D);
+        break;
+      case 0x004E:
+        bufpush(0x006E);
+        break;
+      case 0x004F:
+        bufpush(0x006F);
+        break;
+      case 0x0050:
+        bufpush(0x0070);
+        break;
+      case 0x0051:
+        bufpush(0x0071);
+        break;
+      case 0x0052:
+        bufpush(0x0072);
+        break;
+      case 0x0053:
+        bufpush(0x0073);
+        break;
+      case 0x0054:
+        bufpush(0x0074);
+        break;
+      case 0x0055:
+        bufpush(0x0075);
+        break;
+      case 0x0056:
+        bufpush(0x0076);
+        break;
+      case 0x0057:
+        bufpush(0x0077);
+        break;
+      case 0x0058:
+        bufpush(0x0078);
+        break;
+      case 0x0059:
+        bufpush(0x0079);
+        break;
+      case 0x005A:
+        bufpush(0x007A);
+        break;
+      case 0x00B5:
+        bufpush(0x03BC);
+        break;
+      case 0x00C0:
+        bufpush(0x00E0);
+        break;
+      case 0x00C1:
+        bufpush(0x00E1);
+        break;
+      case 0x00C2:
+        bufpush(0x00E2);
+        break;
+      case 0x00C3:
+        bufpush(0x00E3);
+        break;
+      case 0x00C4:
+        bufpush(0x00E4);
+        break;
+      case 0x00C5:
+        bufpush(0x00E5);
+        break;
+      case 0x00C6:
+        bufpush(0x00E6);
+        break;
+      case 0x00C7:
+        bufpush(0x00E7);
+        break;
+      case 0x00C8:
+        bufpush(0x00E8);
+        break;
+      case 0x00C9:
+        bufpush(0x00E9);
+        break;
+      case 0x00CA:
+        bufpush(0x00EA);
+        break;
+      case 0x00CB:
+        bufpush(0x00EB);
+        break;
+      case 0x00CC:
+        bufpush(0x00EC);
+        break;
+      case 0x00CD:
+        bufpush(0x00ED);
+        break;
+      case 0x00CE:
+        bufpush(0x00EE);
+        break;
+      case 0x00CF:
+        bufpush(0x00EF);
+        break;
+      case 0x00D0:
+        bufpush(0x00F0);
+        break;
+      case 0x00D1:
+        bufpush(0x00F1);
+        break;
+      case 0x00D2:
+        bufpush(0x00F2);
+        break;
+      case 0x00D3:
+        bufpush(0x00F3);
+        break;
+      case 0x00D4:
+        bufpush(0x00F4);
+        break;
+      case 0x00D5:
+        bufpush(0x00F5);
+        break;
+      case 0x00D6:
+        bufpush(0x00F6);
+        break;
+      case 0x00D8:
+        bufpush(0x00F8);
+        break;
+      case 0x00D9:
+        bufpush(0x00F9);
+        break;
+      case 0x00DA:
+        bufpush(0x00FA);
+        break;
+      case 0x00DB:
+        bufpush(0x00FB);
+        break;
+      case 0x00DC:
+        bufpush(0x00FC);
+        break;
+      case 0x00DD:
+        bufpush(0x00FD);
+        break;
+      case 0x00DE:
+        bufpush(0x00FE);
+        break;
+      case 0x00DF:
+        bufpush(0x0073);
+        bufpush(0x0073);
+        break;
+      case 0x0100:
+        bufpush(0x0101);
+        break;
+      case 0x0102:
+        bufpush(0x0103);
+        break;
+      case 0x0104:
+        bufpush(0x0105);
+        break;
+      case 0x0106:
+        bufpush(0x0107);
+        break;
+      case 0x0108:
+        bufpush(0x0109);
+        break;
+      case 0x010A:
+        bufpush(0x010B);
+        break;
+      case 0x010C:
+        bufpush(0x010D);
+        break;
+      case 0x010E:
+        bufpush(0x010F);
+        break;
+      case 0x0110:
+        bufpush(0x0111);
+        break;
+      case 0x0112:
+        bufpush(0x0113);
+        break;
+      case 0x0114:
+        bufpush(0x0115);
+        break;
+      case 0x0116:
+        bufpush(0x0117);
+        break;
+      case 0x0118:
+        bufpush(0x0119);
+        break;
+      case 0x011A:
+        bufpush(0x011B);
+        break;
+      case 0x011C:
+        bufpush(0x011D);
+        break;
+      case 0x011E:
+        bufpush(0x011F);
+        break;
+      case 0x0120:
+        bufpush(0x0121);
+        break;
+      case 0x0122:
+        bufpush(0x0123);
+        break;
+      case 0x0124:
+        bufpush(0x0125);
+        break;
+      case 0x0126:
+        bufpush(0x0127);
+        break;
+      case 0x0128:
+        bufpush(0x0129);
+        break;
+      case 0x012A:
+        bufpush(0x012B);
+        break;
+      case 0x012C:
+        bufpush(0x012D);
+        break;
+      case 0x012E:
+        bufpush(0x012F);
+        break;
+      case 0x0130:
+        bufpush(0x0069);
+        bufpush(0x0307);
+        break;
+      case 0x0132:
+        bufpush(0x0133);
+        break;
+      case 0x0134:
+        bufpush(0x0135);
+        break;
+      case 0x0136:
+        bufpush(0x0137);
+        break;
+      case 0x0139:
+        bufpush(0x013A);
+        break;
+      case 0x013B:
+        bufpush(0x013C);
+        break;
+      case 0x013D:
+        bufpush(0x013E);
+        break;
+      case 0x013F:
+        bufpush(0x0140);
+        break;
+      case 0x0141:
+        bufpush(0x0142);
+        break;
+      case 0x0143:
+        bufpush(0x0144);
+        break;
+      case 0x0145:
+        bufpush(0x0146);
+        break;
+      case 0x0147:
+        bufpush(0x0148);
+        break;
+      case 0x0149:
+        bufpush(0x02BC);
+        bufpush(0x006E);
+        break;
+      case 0x014A:
+        bufpush(0x014B);
+        break;
+      case 0x014C:
+        bufpush(0x014D);
+        break;
+      case 0x014E:
+        bufpush(0x014F);
+        break;
+      case 0x0150:
+        bufpush(0x0151);
+        break;
+      case 0x0152:
+        bufpush(0x0153);
+        break;
+      case 0x0154:
+        bufpush(0x0155);
+        break;
+      case 0x0156:
+        bufpush(0x0157);
+        break;
+      case 0x0158:
+        bufpush(0x0159);
+        break;
+      case 0x015A:
+        bufpush(0x015B);
+        break;
+      case 0x015C:
+        bufpush(0x015D);
+        break;
+      case 0x015E:
+        bufpush(0x015F);
+        break;
+      case 0x0160:
+        bufpush(0x0161);
+        break;
+      case 0x0162:
+        bufpush(0x0163);
+        break;
+      case 0x0164:
+        bufpush(0x0165);
+        break;
+      case 0x0166:
+        bufpush(0x0167);
+        break;
+      case 0x0168:
+        bufpush(0x0169);
+        break;
+      case 0x016A:
+        bufpush(0x016B);
+        break;
+      case 0x016C:
+        bufpush(0x016D);
+        break;
+      case 0x016E:
+        bufpush(0x016F);
+        break;
+      case 0x0170:
+        bufpush(0x0171);
+        break;
+      case 0x0172:
+        bufpush(0x0173);
+        break;
+      case 0x0174:
+        bufpush(0x0175);
+        break;
+      case 0x0176:
+        bufpush(0x0177);
+        break;
+      case 0x0178:
+        bufpush(0x00FF);
+        break;
+      case 0x0179:
+        bufpush(0x017A);
+        break;
+      case 0x017B:
+        bufpush(0x017C);
+        break;
+      case 0x017D:
+        bufpush(0x017E);
+        break;
+      case 0x017F:
+        bufpush(0x0073);
+        break;
+      case 0x0181:
+        bufpush(0x0253);
+        break;
+      case 0x0182:
+        bufpush(0x0183);
+        break;
+      case 0x0184:
+        bufpush(0x0185);
+        break;
+      case 0x0186:
+        bufpush(0x0254);
+        break;
+      case 0x0187:
+        bufpush(0x0188);
+        break;
+      case 0x0189:
+        bufpush(0x0256);
+        break;
+      case 0x018A:
+        bufpush(0x0257);
+        break;
+      case 0x018B:
+        bufpush(0x018C);
+        break;
+      case 0x018E:
+        bufpush(0x01DD);
+        break;
+      case 0x018F:
+        bufpush(0x0259);
+        break;
+      case 0x0190:
+        bufpush(0x025B);
+        break;
+      case 0x0191:
+        bufpush(0x0192);
+        break;
+      case 0x0193:
+        bufpush(0x0260);
+        break;
+      case 0x0194:
+        bufpush(0x0263);
+        break;
+      case 0x0196:
+        bufpush(0x0269);
+        break;
+      case 0x0197:
+        bufpush(0x0268);
+        break;
+      case 0x0198:
+        bufpush(0x0199);
+        break;
+      case 0x019C:
+        bufpush(0x026F);
+        break;
+      case 0x019D:
+        bufpush(0x0272);
+        break;
+      case 0x019F:
+        bufpush(0x0275);
+        break;
+      case 0x01A0:
+        bufpush(0x01A1);
+        break;
+      case 0x01A2:
+        bufpush(0x01A3);
+        break;
+      case 0x01A4:
+        bufpush(0x01A5);
+        break;
+      case 0x01A6:
+        bufpush(0x0280);
+        break;
+      case 0x01A7:
+        bufpush(0x01A8);
+        break;
+      case 0x01A9:
+        bufpush(0x0283);
+        break;
+      case 0x01AC:
+        bufpush(0x01AD);
+        break;
+      case 0x01AE:
+        bufpush(0x0288);
+        break;
+      case 0x01AF:
+        bufpush(0x01B0);
+        break;
+      case 0x01B1:
+        bufpush(0x028A);
+        break;
+      case 0x01B2:
+        bufpush(0x028B);
+        break;
+      case 0x01B3:
+        bufpush(0x01B4);
+        break;
+      case 0x01B5:
+        bufpush(0x01B6);
+        break;
+      case 0x01B7:
+        bufpush(0x0292);
+        break;
+      case 0x01B8:
+        bufpush(0x01B9);
+        break;
+      case 0x01BC:
+        bufpush(0x01BD);
+        break;
+      case 0x01C4:
+        bufpush(0x01C6);
+        break;
+      case 0x01C5:
+        bufpush(0x01C6);
+        break;
+      case 0x01C7:
+        bufpush(0x01C9);
+        break;
+      case 0x01C8:
+        bufpush(0x01C9);
+        break;
+      case 0x01CA:
+        bufpush(0x01CC);
+        break;
+      case 0x01CB:
+        bufpush(0x01CC);
+        break;
+      case 0x01CD:
+        bufpush(0x01CE);
+        break;
+      case 0x01CF:
+        bufpush(0x01D0);
+        break;
+      case 0x01D1:
+        bufpush(0x01D2);
+        break;
+      case 0x01D3:
+        bufpush(0x01D4);
+        break;
+      case 0x01D5:
+        bufpush(0x01D6);
+        break;
+      case 0x01D7:
+        bufpush(0x01D8);
+        break;
+      case 0x01D9:
+        bufpush(0x01DA);
+        break;
+      case 0x01DB:
+        bufpush(0x01DC);
+        break;
+      case 0x01DE:
+        bufpush(0x01DF);
+        break;
+      case 0x01E0:
+        bufpush(0x01E1);
+        break;
+      case 0x01E2:
+        bufpush(0x01E3);
+        break;
+      case 0x01E4:
+        bufpush(0x01E5);
+        break;
+      case 0x01E6:
+        bufpush(0x01E7);
+        break;
+      case 0x01E8:
+        bufpush(0x01E9);
+        break;
+      case 0x01EA:
+        bufpush(0x01EB);
+        break;
+      case 0x01EC:
+        bufpush(0x01ED);
+        break;
+      case 0x01EE:
+        bufpush(0x01EF);
+        break;
+      case 0x01F0:
+        bufpush(0x006A);
+        bufpush(0x030C);
+        break;
+      case 0x01F1:
+        bufpush(0x01F3);
+        break;
+      case 0x01F2:
+        bufpush(0x01F3);
+        break;
+      case 0x01F4:
+        bufpush(0x01F5);
+        break;
+      case 0x01F6:
+        bufpush(0x0195);
+        break;
+      case 0x01F7:
+        bufpush(0x01BF);
+        break;
+      case 0x01F8:
+        bufpush(0x01F9);
+        break;
+      case 0x01FA:
+        bufpush(0x01FB);
+        break;
+      case 0x01FC:
+        bufpush(0x01FD);
+        break;
+      case 0x01FE:
+        bufpush(0x01FF);
+        break;
+      case 0x0200:
+        bufpush(0x0201);
+        break;
+      case 0x0202:
+        bufpush(0x0203);
+        break;
+      case 0x0204:
+        bufpush(0x0205);
+        break;
+      case 0x0206:
+        bufpush(0x0207);
+        break;
+      case 0x0208:
+        bufpush(0x0209);
+        break;
+      case 0x020A:
+        bufpush(0x020B);
+        break;
+      case 0x020C:
+        bufpush(0x020D);
+        break;
+      case 0x020E:
+        bufpush(0x020F);
+        break;
+      case 0x0210:
+        bufpush(0x0211);
+        break;
+      case 0x0212:
+        bufpush(0x0213);
+        break;
+      case 0x0214:
+        bufpush(0x0215);
+        break;
+      case 0x0216:
+        bufpush(0x0217);
+        break;
+      case 0x0218:
+        bufpush(0x0219);
+        break;
+      case 0x021A:
+        bufpush(0x021B);
+        break;
+      case 0x021C:
+        bufpush(0x021D);
+        break;
+      case 0x021E:
+        bufpush(0x021F);
+        break;
+      case 0x0220:
+        bufpush(0x019E);
+        break;
+      case 0x0222:
+        bufpush(0x0223);
+        break;
+      case 0x0224:
+        bufpush(0x0225);
+        break;
+      case 0x0226:
+        bufpush(0x0227);
+        break;
+      case 0x0228:
+        bufpush(0x0229);
+        break;
+      case 0x022A:
+        bufpush(0x022B);
+        break;
+      case 0x022C:
+        bufpush(0x022D);
+        break;
+      case 0x022E:
+        bufpush(0x022F);
+        break;
+      case 0x0230:
+        bufpush(0x0231);
+        break;
+      case 0x0232:
+        bufpush(0x0233);
+        break;
+      case 0x0345:
+        bufpush(0x03B9);
+        break;
+      case 0x0386:
+        bufpush(0x03AC);
+        break;
+      case 0x0388:
+        bufpush(0x03AD);
+        break;
+      case 0x0389:
+        bufpush(0x03AE);
+        break;
+      case 0x038A:
+        bufpush(0x03AF);
+        break;
+      case 0x038C:
+        bufpush(0x03CC);
+        break;
+      case 0x038E:
+        bufpush(0x03CD);
+        break;
+      case 0x038F:
+        bufpush(0x03CE);
+        break;
+      case 0x0390:
+        bufpush(0x03B9);
+        bufpush(0x0308);
+        bufpush(0x0301);
+        break;
+      case 0x0391:
+        bufpush(0x03B1);
+        break;
+      case 0x0392:
+        bufpush(0x03B2);
+        break;
+      case 0x0393:
+        bufpush(0x03B3);
+        break;
+      case 0x0394:
+        bufpush(0x03B4);
+        break;
+      case 0x0395:
+        bufpush(0x03B5);
+        break;
+      case 0x0396:
+        bufpush(0x03B6);
+        break;
+      case 0x0397:
+        bufpush(0x03B7);
+        break;
+      case 0x0398:
+        bufpush(0x03B8);
+        break;
+      case 0x0399:
+        bufpush(0x03B9);
+        break;
+      case 0x039A:
+        bufpush(0x03BA);
+        break;
+      case 0x039B:
+        bufpush(0x03BB);
+        break;
+      case 0x039C:
+        bufpush(0x03BC);
+        break;
+      case 0x039D:
+        bufpush(0x03BD);
+        break;
+      case 0x039E:
+        bufpush(0x03BE);
+        break;
+      case 0x039F:
+        bufpush(0x03BF);
+        break;
+      case 0x03A0:
+        bufpush(0x03C0);
+        break;
+      case 0x03A1:
+        bufpush(0x03C1);
+        break;
+      case 0x03A3:
+        bufpush(0x03C3);
+        break;
+      case 0x03A4:
+        bufpush(0x03C4);
+        break;
+      case 0x03A5:
+        bufpush(0x03C5);
+        break;
+      case 0x03A6:
+        bufpush(0x03C6);
+        break;
+      case 0x03A7:
+        bufpush(0x03C7);
+        break;
+      case 0x03A8:
+        bufpush(0x03C8);
+        break;
+      case 0x03A9:
+        bufpush(0x03C9);
+        break;
+      case 0x03AA:
+        bufpush(0x03CA);
+        break;
+      case 0x03AB:
+        bufpush(0x03CB);
+        break;
+      case 0x03B0:
+        bufpush(0x03C5);
+        bufpush(0x0308);
+        bufpush(0x0301);
+        break;
+      case 0x03C2:
+        bufpush(0x03C3);
+        break;
+      case 0x03D0:
+        bufpush(0x03B2);
+        break;
+      case 0x03D1:
+        bufpush(0x03B8);
+        break;
+      case 0x03D5:
+        bufpush(0x03C6);
+        break;
+      case 0x03D6:
+        bufpush(0x03C0);
+        break;
+      case 0x03D8:
+        bufpush(0x03D9);
+        break;
+      case 0x03DA:
+        bufpush(0x03DB);
+        break;
+      case 0x03DC:
+        bufpush(0x03DD);
+        break;
+      case 0x03DE:
+        bufpush(0x03DF);
+        break;
+      case 0x03E0:
+        bufpush(0x03E1);
+        break;
+      case 0x03E2:
+        bufpush(0x03E3);
+        break;
+      case 0x03E4:
+        bufpush(0x03E5);
+        break;
+      case 0x03E6:
+        bufpush(0x03E7);
+        break;
+      case 0x03E8:
+        bufpush(0x03E9);
+        break;
+      case 0x03EA:
+        bufpush(0x03EB);
+        break;
+      case 0x03EC:
+        bufpush(0x03ED);
+        break;
+      case 0x03EE:
+        bufpush(0x03EF);
+        break;
+      case 0x03F0:
+        bufpush(0x03BA);
+        break;
+      case 0x03F1:
+        bufpush(0x03C1);
+        break;
+      case 0x03F2:
+        bufpush(0x03C3);
+        break;
+      case 0x03F4:
+        bufpush(0x03B8);
+        break;
+      case 0x03F5:
+        bufpush(0x03B5);
+        break;
+      case 0x0400:
+        bufpush(0x0450);
+        break;
+      case 0x0401:
+        bufpush(0x0451);
+        break;
+      case 0x0402:
+        bufpush(0x0452);
+        break;
+      case 0x0403:
+        bufpush(0x0453);
+        break;
+      case 0x0404:
+        bufpush(0x0454);
+        break;
+      case 0x0405:
+        bufpush(0x0455);
+        break;
+      case 0x0406:
+        bufpush(0x0456);
+        break;
+      case 0x0407:
+        bufpush(0x0457);
+        break;
+      case 0x0408:
+        bufpush(0x0458);
+        break;
+      case 0x0409:
+        bufpush(0x0459);
+        break;
+      case 0x040A:
+        bufpush(0x045A);
+        break;
+      case 0x040B:
+        bufpush(0x045B);
+        break;
+      case 0x040C:
+        bufpush(0x045C);
+        break;
+      case 0x040D:
+        bufpush(0x045D);
+        break;
+      case 0x040E:
+        bufpush(0x045E);
+        break;
+      case 0x040F:
+        bufpush(0x045F);
+        break;
+      case 0x0410:
+        bufpush(0x0430);
+        break;
+      case 0x0411:
+        bufpush(0x0431);
+        break;
+      case 0x0412:
+        bufpush(0x0432);
+        break;
+      case 0x0413:
+        bufpush(0x0433);
+        break;
+      case 0x0414:
+        bufpush(0x0434);
+        break;
+      case 0x0415:
+        bufpush(0x0435);
+        break;
+      case 0x0416:
+        bufpush(0x0436);
+        break;
+      case 0x0417:
+        bufpush(0x0437);
+        break;
+      case 0x0418:
+        bufpush(0x0438);
+        break;
+      case 0x0419:
+        bufpush(0x0439);
+        break;
+      case 0x041A:
+        bufpush(0x043A);
+        break;
+      case 0x041B:
+        bufpush(0x043B);
+        break;
+      case 0x041C:
+        bufpush(0x043C);
+        break;
+      case 0x041D:
+        bufpush(0x043D);
+        break;
+      case 0x041E:
+        bufpush(0x043E);
+        break;
+      case 0x041F:
+        bufpush(0x043F);
+        break;
+      case 0x0420:
+        bufpush(0x0440);
+        break;
+      case 0x0421:
+        bufpush(0x0441);
+        break;
+      case 0x0422:
+        bufpush(0x0442);
+        break;
+      case 0x0423:
+        bufpush(0x0443);
+        break;
+      case 0x0424:
+        bufpush(0x0444);
+        break;
+      case 0x0425:
+        bufpush(0x0445);
+        break;
+      case 0x0426:
+        bufpush(0x0446);
+        break;
+      case 0x0427:
+        bufpush(0x0447);
+        break;
+      case 0x0428:
+        bufpush(0x0448);
+        break;
+      case 0x0429:
+        bufpush(0x0449);
+        break;
+      case 0x042A:
+        bufpush(0x044A);
+        break;
+      case 0x042B:
+        bufpush(0x044B);
+        break;
+      case 0x042C:
+        bufpush(0x044C);
+        break;
+      case 0x042D:
+        bufpush(0x044D);
+        break;
+      case 0x042E:
+        bufpush(0x044E);
+        break;
+      case 0x042F:
+        bufpush(0x044F);
+        break;
+      case 0x0460:
+        bufpush(0x0461);
+        break;
+      case 0x0462:
+        bufpush(0x0463);
+        break;
+      case 0x0464:
+        bufpush(0x0465);
+        break;
+      case 0x0466:
+        bufpush(0x0467);
+        break;
+      case 0x0468:
+        bufpush(0x0469);
+        break;
+      case 0x046A:
+        bufpush(0x046B);
+        break;
+      case 0x046C:
+        bufpush(0x046D);
+        break;
+      case 0x046E:
+        bufpush(0x046F);
+        break;
+      case 0x0470:
+        bufpush(0x0471);
+        break;
+      case 0x0472:
+        bufpush(0x0473);
+        break;
+      case 0x0474:
+        bufpush(0x0475);
+        break;
+      case 0x0476:
+        bufpush(0x0477);
+        break;
+      case 0x0478:
+        bufpush(0x0479);
+        break;
+      case 0x047A:
+        bufpush(0x047B);
+        break;
+      case 0x047C:
+        bufpush(0x047D);
+        break;
+      case 0x047E:
+        bufpush(0x047F);
+        break;
+      case 0x0480:
+        bufpush(0x0481);
+        break;
+      case 0x048A:
+        bufpush(0x048B);
+        break;
+      case 0x048C:
+        bufpush(0x048D);
+        break;
+      case 0x048E:
+        bufpush(0x048F);
+        break;
+      case 0x0490:
+        bufpush(0x0491);
+        break;
+      case 0x0492:
+        bufpush(0x0493);
+        break;
+      case 0x0494:
+        bufpush(0x0495);
+        break;
+      case 0x0496:
+        bufpush(0x0497);
+        break;
+      case 0x0498:
+        bufpush(0x0499);
+        break;
+      case 0x049A:
+        bufpush(0x049B);
+        break;
+      case 0x049C:
+        bufpush(0x049D);
+        break;
+      case 0x049E:
+        bufpush(0x049F);
+        break;
+      case 0x04A0:
+        bufpush(0x04A1);
+        break;
+      case 0x04A2:
+        bufpush(0x04A3);
+        break;
+      case 0x04A4:
+        bufpush(0x04A5);
+        break;
+      case 0x04A6:
+        bufpush(0x04A7);
+        break;
+      case 0x04A8:
+        bufpush(0x04A9);
+        break;
+      case 0x04AA:
+        bufpush(0x04AB);
+        break;
+      case 0x04AC:
+        bufpush(0x04AD);
+        break;
+      case 0x04AE:
+        bufpush(0x04AF);
+        break;
+      case 0x04B0:
+        bufpush(0x04B1);
+        break;
+      case 0x04B2:
+        bufpush(0x04B3);
+        break;
+      case 0x04B4:
+        bufpush(0x04B5);
+        break;
+      case 0x04B6:
+        bufpush(0x04B7);
+        break;
+      case 0x04B8:
+        bufpush(0x04B9);
+        break;
+      case 0x04BA:
+        bufpush(0x04BB);
+        break;
+      case 0x04BC:
+        bufpush(0x04BD);
+        break;
+      case 0x04BE:
+        bufpush(0x04BF);
+        break;
+      case 0x04C1:
+        bufpush(0x04C2);
+        break;
+      case 0x04C3:
+        bufpush(0x04C4);
+        break;
+      case 0x04C5:
+        bufpush(0x04C6);
+        break;
+      case 0x04C7:
+        bufpush(0x04C8);
+        break;
+      case 0x04C9:
+        bufpush(0x04CA);
+        break;
+      case 0x04CB:
+        bufpush(0x04CC);
+        break;
+      case 0x04CD:
+        bufpush(0x04CE);
+        break;
+      case 0x04D0:
+        bufpush(0x04D1);
+        break;
+      case 0x04D2:
+        bufpush(0x04D3);
+        break;
+      case 0x04D4:
+        bufpush(0x04D5);
+        break;
+      case 0x04D6:
+        bufpush(0x04D7);
+        break;
+      case 0x04D8:
+        bufpush(0x04D9);
+        break;
+      case 0x04DA:
+        bufpush(0x04DB);
+        break;
+      case 0x04DC:
+        bufpush(0x04DD);
+        break;
+      case 0x04DE:
+        bufpush(0x04DF);
+        break;
+      case 0x04E0:
+        bufpush(0x04E1);
+        break;
+      case 0x04E2:
+        bufpush(0x04E3);
+        break;
+      case 0x04E4:
+        bufpush(0x04E5);
+        break;
+      case 0x04E6:
+        bufpush(0x04E7);
+        break;
+      case 0x04E8:
+        bufpush(0x04E9);
+        break;
+      case 0x04EA:
+        bufpush(0x04EB);
+        break;
+      case 0x04EC:
+        bufpush(0x04ED);
+        break;
+      case 0x04EE:
+        bufpush(0x04EF);
+        break;
+      case 0x04F0:
+        bufpush(0x04F1);
+        break;
+      case 0x04F2:
+        bufpush(0x04F3);
+        break;
+      case 0x04F4:
+        bufpush(0x04F5);
+        break;
+      case 0x04F8:
+        bufpush(0x04F9);
+        break;
+      case 0x0500:
+        bufpush(0x0501);
+        break;
+      case 0x0502:
+        bufpush(0x0503);
+        break;
+      case 0x0504:
+        bufpush(0x0505);
+        break;
+      case 0x0506:
+        bufpush(0x0507);
+        break;
+      case 0x0508:
+        bufpush(0x0509);
+        break;
+      case 0x050A:
+        bufpush(0x050B);
+        break;
+      case 0x050C:
+        bufpush(0x050D);
+        break;
+      case 0x050E:
+        bufpush(0x050F);
+        break;
+      case 0x0531:
+        bufpush(0x0561);
+        break;
+      case 0x0532:
+        bufpush(0x0562);
+        break;
+      case 0x0533:
+        bufpush(0x0563);
+        break;
+      case 0x0534:
+        bufpush(0x0564);
+        break;
+      case 0x0535:
+        bufpush(0x0565);
+        break;
+      case 0x0536:
+        bufpush(0x0566);
+        break;
+      case 0x0537:
+        bufpush(0x0567);
+        break;
+      case 0x0538:
+        bufpush(0x0568);
+        break;
+      case 0x0539:
+        bufpush(0x0569);
+        break;
+      case 0x053A:
+        bufpush(0x056A);
+        break;
+      case 0x053B:
+        bufpush(0x056B);
+        break;
+      case 0x053C:
+        bufpush(0x056C);
+        break;
+      case 0x053D:
+        bufpush(0x056D);
+        break;
+      case 0x053E:
+        bufpush(0x056E);
+        break;
+      case 0x053F:
+        bufpush(0x056F);
+        break;
+      case 0x0540:
+        bufpush(0x0570);
+        break;
+      case 0x0541:
+        bufpush(0x0571);
+        break;
+      case 0x0542:
+        bufpush(0x0572);
+        break;
+      case 0x0543:
+        bufpush(0x0573);
+        break;
+      case 0x0544:
+        bufpush(0x0574);
+        break;
+      case 0x0545:
+        bufpush(0x0575);
+        break;
+      case 0x0546:
+        bufpush(0x0576);
+        break;
+      case 0x0547:
+        bufpush(0x0577);
+        break;
+      case 0x0548:
+        bufpush(0x0578);
+        break;
+      case 0x0549:
+        bufpush(0x0579);
+        break;
+      case 0x054A:
+        bufpush(0x057A);
+        break;
+      case 0x054B:
+        bufpush(0x057B);
+        break;
+      case 0x054C:
+        bufpush(0x057C);
+        break;
+      case 0x054D:
+        bufpush(0x057D);
+        break;
+      case 0x054E:
+        bufpush(0x057E);
+        break;
+      case 0x054F:
+        bufpush(0x057F);
+        break;
+      case 0x0550:
+        bufpush(0x0580);
+        break;
+      case 0x0551:
+        bufpush(0x0581);
+        break;
+      case 0x0552:
+        bufpush(0x0582);
+        break;
+      case 0x0553:
+        bufpush(0x0583);
+        break;
+      case 0x0554:
+        bufpush(0x0584);
+        break;
+      case 0x0555:
+        bufpush(0x0585);
+        break;
+      case 0x0556:
+        bufpush(0x0586);
+        break;
+      case 0x0587:
+        bufpush(0x0565);
+        bufpush(0x0582);
+        break;
+      case 0x1E00:
+        bufpush(0x1E01);
+        break;
+      case 0x1E02:
+        bufpush(0x1E03);
+        break;
+      case 0x1E04:
+        bufpush(0x1E05);
+        break;
+      case 0x1E06:
+        bufpush(0x1E07);
+        break;
+      case 0x1E08:
+        bufpush(0x1E09);
+        break;
+      case 0x1E0A:
+        bufpush(0x1E0B);
+        break;
+      case 0x1E0C:
+        bufpush(0x1E0D);
+        break;
+      case 0x1E0E:
+        bufpush(0x1E0F);
+        break;
+      case 0x1E10:
+        bufpush(0x1E11);
+        break;
+      case 0x1E12:
+        bufpush(0x1E13);
+        break;
+      case 0x1E14:
+        bufpush(0x1E15);
+        break;
+      case 0x1E16:
+        bufpush(0x1E17);
+        break;
+      case 0x1E18:
+        bufpush(0x1E19);
+        break;
+      case 0x1E1A:
+        bufpush(0x1E1B);
+        break;
+      case 0x1E1C:
+        bufpush(0x1E1D);
+        break;
+      case 0x1E1E:
+        bufpush(0x1E1F);
+        break;
+      case 0x1E20:
+        bufpush(0x1E21);
+        break;
+      case 0x1E22:
+        bufpush(0x1E23);
+        break;
+      case 0x1E24:
+        bufpush(0x1E25);
+        break;
+      case 0x1E26:
+        bufpush(0x1E27);
+        break;
+      case 0x1E28:
+        bufpush(0x1E29);
+        break;
+      case 0x1E2A:
+        bufpush(0x1E2B);
+        break;
+      case 0x1E2C:
+        bufpush(0x1E2D);
+        break;
+      case 0x1E2E:
+        bufpush(0x1E2F);
+        break;
+      case 0x1E30:
+        bufpush(0x1E31);
+        break;
+      case 0x1E32:
+        bufpush(0x1E33);
+        break;
+      case 0x1E34:
+        bufpush(0x1E35);
+        break;
+      case 0x1E36:
+        bufpush(0x1E37);
+        break;
+      case 0x1E38:
+        bufpush(0x1E39);
+        break;
+      case 0x1E3A:
+        bufpush(0x1E3B);
+        break;
+      case 0x1E3C:
+        bufpush(0x1E3D);
+        break;
+      case 0x1E3E:
+        bufpush(0x1E3F);
+        break;
+      case 0x1E40:
+        bufpush(0x1E41);
+        break;
+      case 0x1E42:
+        bufpush(0x1E43);
+        break;
+      case 0x1E44:
+        bufpush(0x1E45);
+        break;
+      case 0x1E46:
+        bufpush(0x1E47);
+        break;
+      case 0x1E48:
+        bufpush(0x1E49);
+        break;
+      case 0x1E4A:
+        bufpush(0x1E4B);
+        break;
+      case 0x1E4C:
+        bufpush(0x1E4D);
+        break;
+      case 0x1E4E:
+        bufpush(0x1E4F);
+        break;
+      case 0x1E50:
+        bufpush(0x1E51);
+        break;
+      case 0x1E52:
+        bufpush(0x1E53);
+        break;
+      case 0x1E54:
+        bufpush(0x1E55);
+        break;
+      case 0x1E56:
+        bufpush(0x1E57);
+        break;
+      case 0x1E58:
+        bufpush(0x1E59);
+        break;
+      case 0x1E5A:
+        bufpush(0x1E5B);
+        break;
+      case 0x1E5C:
+        bufpush(0x1E5D);
+        break;
+      case 0x1E5E:
+        bufpush(0x1E5F);
+        break;
+      case 0x1E60:
+        bufpush(0x1E61);
+        break;
+      case 0x1E62:
+        bufpush(0x1E63);
+        break;
+      case 0x1E64:
+        bufpush(0x1E65);
+        break;
+      case 0x1E66:
+        bufpush(0x1E67);
+        break;
+      case 0x1E68:
+        bufpush(0x1E69);
+        break;
+      case 0x1E6A:
+        bufpush(0x1E6B);
+        break;
+      case 0x1E6C:
+        bufpush(0x1E6D);
+        break;
+      case 0x1E6E:
+        bufpush(0x1E6F);
+        break;
+      case 0x1E70:
+        bufpush(0x1E71);
+        break;
+      case 0x1E72:
+        bufpush(0x1E73);
+        break;
+      case 0x1E74:
+        bufpush(0x1E75);
+        break;
+      case 0x1E76:
+        bufpush(0x1E77);
+        break;
+      case 0x1E78:
+        bufpush(0x1E79);
+        break;
+      case 0x1E7A:
+        bufpush(0x1E7B);
+        break;
+      case 0x1E7C:
+        bufpush(0x1E7D);
+        break;
+      case 0x1E7E:
+        bufpush(0x1E7F);
+        break;
+      case 0x1E80:
+        bufpush(0x1E81);
+        break;
+      case 0x1E82:
+        bufpush(0x1E83);
+        break;
+      case 0x1E84:
+        bufpush(0x1E85);
+        break;
+      case 0x1E86:
+        bufpush(0x1E87);
+        break;
+      case 0x1E88:
+        bufpush(0x1E89);
+        break;
+      case 0x1E8A:
+        bufpush(0x1E8B);
+        break;
+      case 0x1E8C:
+        bufpush(0x1E8D);
+        break;
+      case 0x1E8E:
+        bufpush(0x1E8F);
+        break;
+      case 0x1E90:
+        bufpush(0x1E91);
+        break;
+      case 0x1E92:
+        bufpush(0x1E93);
+        break;
+      case 0x1E94:
+        bufpush(0x1E95);
+        break;
+      case 0x1E96:
+        bufpush(0x0068);
+        bufpush(0x0331);
+        break;
+      case 0x1E97:
+        bufpush(0x0074);
+        bufpush(0x0308);
+        break;
+      case 0x1E98:
+        bufpush(0x0077);
+        bufpush(0x030A);
+        break;
+      case 0x1E99:
+        bufpush(0x0079);
+        bufpush(0x030A);
+        break;
+      case 0x1E9A:
+        bufpush(0x0061);
+        bufpush(0x02BE);
+        break;
+      case 0x1E9B:
+        bufpush(0x1E61);
+        break;
+      case 0x1EA0:
+        bufpush(0x1EA1);
+        break;
+      case 0x1EA2:
+        bufpush(0x1EA3);
+        break;
+      case 0x1EA4:
+        bufpush(0x1EA5);
+        break;
+      case 0x1EA6:
+        bufpush(0x1EA7);
+        break;
+      case 0x1EA8:
+        bufpush(0x1EA9);
+        break;
+      case 0x1EAA:
+        bufpush(0x1EAB);
+        break;
+      case 0x1EAC:
+        bufpush(0x1EAD);
+        break;
+      case 0x1EAE:
+        bufpush(0x1EAF);
+        break;
+      case 0x1EB0:
+        bufpush(0x1EB1);
+        break;
+      case 0x1EB2:
+        bufpush(0x1EB3);
+        break;
+      case 0x1EB4:
+        bufpush(0x1EB5);
+        break;
+      case 0x1EB6:
+        bufpush(0x1EB7);
+        break;
+      case 0x1EB8:
+        bufpush(0x1EB9);
+        break;
+      case 0x1EBA:
+        bufpush(0x1EBB);
+        break;
+      case 0x1EBC:
+        bufpush(0x1EBD);
+        break;
+      case 0x1EBE:
+        bufpush(0x1EBF);
+        break;
+      case 0x1EC0:
+        bufpush(0x1EC1);
+        break;
+      case 0x1EC2:
+        bufpush(0x1EC3);
+        break;
+      case 0x1EC4:
+        bufpush(0x1EC5);
+        break;
+      case 0x1EC6:
+        bufpush(0x1EC7);
+        break;
+      case 0x1EC8:
+        bufpush(0x1EC9);
+        break;
+      case 0x1ECA:
+        bufpush(0x1ECB);
+        break;
+      case 0x1ECC:
+        bufpush(0x1ECD);
+        break;
+      case 0x1ECE:
+        bufpush(0x1ECF);
+        break;
+      case 0x1ED0:
+        bufpush(0x1ED1);
+        break;
+      case 0x1ED2:
+        bufpush(0x1ED3);
+        break;
+      case 0x1ED4:
+        bufpush(0x1ED5);
+        break;
+      case 0x1ED6:
+        bufpush(0x1ED7);
+        break;
+      case 0x1ED8:
+        bufpush(0x1ED9);
+        break;
+      case 0x1EDA:
+        bufpush(0x1EDB);
+        break;
+      case 0x1EDC:
+        bufpush(0x1EDD);
+        break;
+      case 0x1EDE:
+        bufpush(0x1EDF);
+        break;
+      case 0x1EE0:
+        bufpush(0x1EE1);
+        break;
+      case 0x1EE2:
+        bufpush(0x1EE3);
+        break;
+      case 0x1EE4:
+        bufpush(0x1EE5);
+        break;
+      case 0x1EE6:
+        bufpush(0x1EE7);
+        break;
+      case 0x1EE8:
+        bufpush(0x1EE9);
+        break;
+      case 0x1EEA:
+        bufpush(0x1EEB);
+        break;
+      case 0x1EEC:
+        bufpush(0x1EED);
+        break;
+      case 0x1EEE:
+        bufpush(0x1EEF);
+        break;
+      case 0x1EF0:
+        bufpush(0x1EF1);
+        break;
+      case 0x1EF2:
+        bufpush(0x1EF3);
+        break;
+      case 0x1EF4:
+        bufpush(0x1EF5);
+        break;
+      case 0x1EF6:
+        bufpush(0x1EF7);
+        break;
+      case 0x1EF8:
+        bufpush(0x1EF9);
+        break;
+      case 0x1F08:
+        bufpush(0x1F00);
+        break;
+      case 0x1F09:
+        bufpush(0x1F01);
+        break;
+      case 0x1F0A:
+        bufpush(0x1F02);
+        break;
+      case 0x1F0B:
+        bufpush(0x1F03);
+        break;
+      case 0x1F0C:
+        bufpush(0x1F04);
+        break;
+      case 0x1F0D:
+        bufpush(0x1F05);
+        break;
+      case 0x1F0E:
+        bufpush(0x1F06);
+        break;
+      case 0x1F0F:
+        bufpush(0x1F07);
+        break;
+      case 0x1F18:
+        bufpush(0x1F10);
+        break;
+      case 0x1F19:
+        bufpush(0x1F11);
+        break;
+      case 0x1F1A:
+        bufpush(0x1F12);
+        break;
+      case 0x1F1B:
+        bufpush(0x1F13);
+        break;
+      case 0x1F1C:
+        bufpush(0x1F14);
+        break;
+      case 0x1F1D:
+        bufpush(0x1F15);
+        break;
+      case 0x1F28:
+        bufpush(0x1F20);
+        break;
+      case 0x1F29:
+        bufpush(0x1F21);
+        break;
+      case 0x1F2A:
+        bufpush(0x1F22);
+        break;
+      case 0x1F2B:
+        bufpush(0x1F23);
+        break;
+      case 0x1F2C:
+        bufpush(0x1F24);
+        break;
+      case 0x1F2D:
+        bufpush(0x1F25);
+        break;
+      case 0x1F2E:
+        bufpush(0x1F26);
+        break;
+      case 0x1F2F:
+        bufpush(0x1F27);
+        break;
+      case 0x1F38:
+        bufpush(0x1F30);
+        break;
+      case 0x1F39:
+        bufpush(0x1F31);
+        break;
+      case 0x1F3A:
+        bufpush(0x1F32);
+        break;
+      case 0x1F3B:
+        bufpush(0x1F33);
+        break;
+      case 0x1F3C:
+        bufpush(0x1F34);
+        break;
+      case 0x1F3D:
+        bufpush(0x1F35);
+        break;
+      case 0x1F3E:
+        bufpush(0x1F36);
+        break;
+      case 0x1F3F:
+        bufpush(0x1F37);
+        break;
+      case 0x1F48:
+        bufpush(0x1F40);
+        break;
+      case 0x1F49:
+        bufpush(0x1F41);
+        break;
+      case 0x1F4A:
+        bufpush(0x1F42);
+        break;
+      case 0x1F4B:
+        bufpush(0x1F43);
+        break;
+      case 0x1F4C:
+        bufpush(0x1F44);
+        break;
+      case 0x1F4D:
+        bufpush(0x1F45);
+        break;
+      case 0x1F50:
+        bufpush(0x03C5);
+        bufpush(0x0313);
+        break;
+      case 0x1F52:
+        bufpush(0x03C5);
+        bufpush(0x0313);
+        bufpush(0x0300);
+        break;
+      case 0x1F54:
+        bufpush(0x03C5);
+        bufpush(0x0313);
+        bufpush(0x0301);
+        break;
+      case 0x1F56:
+        bufpush(0x03C5);
+        bufpush(0x0313);
+        bufpush(0x0342);
+        break;
+      case 0x1F59:
+        bufpush(0x1F51);
+        break;
+      case 0x1F5B:
+        bufpush(0x1F53);
+        break;
+      case 0x1F5D:
+        bufpush(0x1F55);
+        break;
+      case 0x1F5F:
+        bufpush(0x1F57);
+        break;
+      case 0x1F68:
+        bufpush(0x1F60);
+        break;
+      case 0x1F69:
+        bufpush(0x1F61);
+        break;
+      case 0x1F6A:
+        bufpush(0x1F62);
+        break;
+      case 0x1F6B:
+        bufpush(0x1F63);
+        break;
+      case 0x1F6C:
+        bufpush(0x1F64);
+        break;
+      case 0x1F6D:
+        bufpush(0x1F65);
+        break;
+      case 0x1F6E:
+        bufpush(0x1F66);
+        break;
+      case 0x1F6F:
+        bufpush(0x1F67);
+        break;
+      case 0x1F80:
+        bufpush(0x1F00);
+        bufpush(0x03B9);
+        break;
+      case 0x1F81:
+        bufpush(0x1F01);
+        bufpush(0x03B9);
+        break;
+      case 0x1F82:
+        bufpush(0x1F02);
+        bufpush(0x03B9);
+        break;
+      case 0x1F83:
+        bufpush(0x1F03);
+        bufpush(0x03B9);
+        break;
+      case 0x1F84:
+        bufpush(0x1F04);
+        bufpush(0x03B9);
+        break;
+      case 0x1F85:
+        bufpush(0x1F05);
+        bufpush(0x03B9);
+        break;
+      case 0x1F86:
+        bufpush(0x1F06);
+        bufpush(0x03B9);
+        break;
+      case 0x1F87:
+        bufpush(0x1F07);
+        bufpush(0x03B9);
+        break;
+      case 0x1F88:
+        bufpush(0x1F00);
+        bufpush(0x03B9);
+        break;
+      case 0x1F89:
+        bufpush(0x1F01);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8A:
+        bufpush(0x1F02);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8B:
+        bufpush(0x1F03);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8C:
+        bufpush(0x1F04);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8D:
+        bufpush(0x1F05);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8E:
+        bufpush(0x1F06);
+        bufpush(0x03B9);
+        break;
+      case 0x1F8F:
+        bufpush(0x1F07);
+        bufpush(0x03B9);
+        break;
+      case 0x1F90:
+        bufpush(0x1F20);
+        bufpush(0x03B9);
+        break;
+      case 0x1F91:
+        bufpush(0x1F21);
+        bufpush(0x03B9);
+        break;
+      case 0x1F92:
+        bufpush(0x1F22);
+        bufpush(0x03B9);
+        break;
+      case 0x1F93:
+        bufpush(0x1F23);
+        bufpush(0x03B9);
+        break;
+      case 0x1F94:
+        bufpush(0x1F24);
+        bufpush(0x03B9);
+        break;
+      case 0x1F95:
+        bufpush(0x1F25);
+        bufpush(0x03B9);
+        break;
+      case 0x1F96:
+        bufpush(0x1F26);
+        bufpush(0x03B9);
+        break;
+      case 0x1F97:
+        bufpush(0x1F27);
+        bufpush(0x03B9);
+        break;
+      case 0x1F98:
+        bufpush(0x1F20);
+        bufpush(0x03B9);
+        break;
+      case 0x1F99:
+        bufpush(0x1F21);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9A:
+        bufpush(0x1F22);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9B:
+        bufpush(0x1F23);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9C:
+        bufpush(0x1F24);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9D:
+        bufpush(0x1F25);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9E:
+        bufpush(0x1F26);
+        bufpush(0x03B9);
+        break;
+      case 0x1F9F:
+        bufpush(0x1F27);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA0:
+        bufpush(0x1F60);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA1:
+        bufpush(0x1F61);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA2:
+        bufpush(0x1F62);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA3:
+        bufpush(0x1F63);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA4:
+        bufpush(0x1F64);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA5:
+        bufpush(0x1F65);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA6:
+        bufpush(0x1F66);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA7:
+        bufpush(0x1F67);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA8:
+        bufpush(0x1F60);
+        bufpush(0x03B9);
+        break;
+      case 0x1FA9:
+        bufpush(0x1F61);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAA:
+        bufpush(0x1F62);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAB:
+        bufpush(0x1F63);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAC:
+        bufpush(0x1F64);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAD:
+        bufpush(0x1F65);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAE:
+        bufpush(0x1F66);
+        bufpush(0x03B9);
+        break;
+      case 0x1FAF:
+        bufpush(0x1F67);
+        bufpush(0x03B9);
+        break;
+      case 0x1FB2:
+        bufpush(0x1F70);
+        bufpush(0x03B9);
+        break;
+      case 0x1FB3:
+        bufpush(0x03B1);
+        bufpush(0x03B9);
+        break;
+      case 0x1FB4:
+        bufpush(0x03AC);
+        bufpush(0x03B9);
+        break;
+      case 0x1FB6:
+        bufpush(0x03B1);
+        bufpush(0x0342);
+        break;
+      case 0x1FB7:
+        bufpush(0x03B1);
+        bufpush(0x0342);
+        bufpush(0x03B9);
+        break;
+      case 0x1FB8:
+        bufpush(0x1FB0);
+        break;
+      case 0x1FB9:
+        bufpush(0x1FB1);
+        break;
+      case 0x1FBA:
+        bufpush(0x1F70);
+        break;
+      case 0x1FBB:
+        bufpush(0x1F71);
+        break;
+      case 0x1FBC:
+        bufpush(0x03B1);
+        bufpush(0x03B9);
+        break;
+      case 0x1FBE:
+        bufpush(0x03B9);
+        break;
+      case 0x1FC2:
+        bufpush(0x1F74);
+        bufpush(0x03B9);
+        break;
+      case 0x1FC3:
+        bufpush(0x03B7);
+        bufpush(0x03B9);
+        break;
+      case 0x1FC4:
+        bufpush(0x03AE);
+        bufpush(0x03B9);
+        break;
+      case 0x1FC6:
+        bufpush(0x03B7);
+        bufpush(0x0342);
+        break;
+      case 0x1FC7:
+        bufpush(0x03B7);
+        bufpush(0x0342);
+        bufpush(0x03B9);
+        break;
+      case 0x1FC8:
+        bufpush(0x1F72);
+        break;
+      case 0x1FC9:
+        bufpush(0x1F73);
+        break;
+      case 0x1FCA:
+        bufpush(0x1F74);
+        break;
+      case 0x1FCB:
+        bufpush(0x1F75);
+        break;
+      case 0x1FCC:
+        bufpush(0x03B7);
+        bufpush(0x03B9);
+        break;
+      case 0x1FD2:
+        bufpush(0x03B9);
+        bufpush(0x0308);
+        bufpush(0x0300);
+        break;
+      case 0x1FD3:
+        bufpush(0x03B9);
+        bufpush(0x0308);
+        bufpush(0x0301);
+        break;
+      case 0x1FD6:
+        bufpush(0x03B9);
+        bufpush(0x0342);
+        break;
+      case 0x1FD7:
+        bufpush(0x03B9);
+        bufpush(0x0308);
+        bufpush(0x0342);
+        break;
+      case 0x1FD8:
+        bufpush(0x1FD0);
+        break;
+      case 0x1FD9:
+        bufpush(0x1FD1);
+        break;
+      case 0x1FDA:
+        bufpush(0x1F76);
+        break;
+      case 0x1FDB:
+        bufpush(0x1F77);
+        break;
+      case 0x1FE2:
+        bufpush(0x03C5);
+        bufpush(0x0308);
+        bufpush(0x0300);
+        break;
+      case 0x1FE3:
+        bufpush(0x03C5);
+        bufpush(0x0308);
+        bufpush(0x0301);
+        break;
+      case 0x1FE4:
+        bufpush(0x03C1);
+        bufpush(0x0313);
+        break;
+      case 0x1FE6:
+        bufpush(0x03C5);
+        bufpush(0x0342);
+        break;
+      case 0x1FE7:
+        bufpush(0x03C5);
+        bufpush(0x0308);
+        bufpush(0x0342);
+        break;
+      case 0x1FE8:
+        bufpush(0x1FE0);
+        break;
+      case 0x1FE9:
+        bufpush(0x1FE1);
+        break;
+      case 0x1FEA:
+        bufpush(0x1F7A);
+        break;
+      case 0x1FEB:
+        bufpush(0x1F7B);
+        break;
+      case 0x1FEC:
+        bufpush(0x1FE5);
+        break;
+      case 0x1FF2:
+        bufpush(0x1F7C);
+        bufpush(0x03B9);
+        break;
+      case 0x1FF3:
+        bufpush(0x03C9);
+        bufpush(0x03B9);
+        break;
+      case 0x1FF4:
+        bufpush(0x03CE);
+        bufpush(0x03B9);
+        break;
+      case 0x1FF6:
+        bufpush(0x03C9);
+        bufpush(0x0342);
+        break;
+      case 0x1FF7:
+        bufpush(0x03C9);
+        bufpush(0x0342);
+        bufpush(0x03B9);
+        break;
+      case 0x1FF8:
+        bufpush(0x1F78);
+        break;
+      case 0x1FF9:
+        bufpush(0x1F79);
+        break;
+      case 0x1FFA:
+        bufpush(0x1F7C);
+        break;
+      case 0x1FFB:
+        bufpush(0x1F7D);
+        break;
+      case 0x1FFC:
+        bufpush(0x03C9);
+        bufpush(0x03B9);
+        break;
+      case 0x2126:
+        bufpush(0x03C9);
+        break;
+      case 0x212A:
+        bufpush(0x006B);
+        break;
+      case 0x212B:
+        bufpush(0x00E5);
+        break;
+      case 0x2160:
+        bufpush(0x2170);
+        break;
+      case 0x2161:
+        bufpush(0x2171);
+        break;
+      case 0x2162:
+        bufpush(0x2172);
+        break;
+      case 0x2163:
+        bufpush(0x2173);
+        break;
+      case 0x2164:
+        bufpush(0x2174);
+        break;
+      case 0x2165:
+        bufpush(0x2175);
+        break;
+      case 0x2166:
+        bufpush(0x2176);
+        break;
+      case 0x2167:
+        bufpush(0x2177);
+        break;
+      case 0x2168:
+        bufpush(0x2178);
+        break;
+      case 0x2169:
+        bufpush(0x2179);
+        break;
+      case 0x216A:
+        bufpush(0x217A);
+        break;
+      case 0x216B:
+        bufpush(0x217B);
+        break;
+      case 0x216C:
+        bufpush(0x217C);
+        break;
+      case 0x216D:
+        bufpush(0x217D);
+        break;
+      case 0x216E:
+        bufpush(0x217E);
+        break;
+      case 0x216F:
+        bufpush(0x217F);
+        break;
+      case 0x24B6:
+        bufpush(0x24D0);
+        break;
+      case 0x24B7:
+        bufpush(0x24D1);
+        break;
+      case 0x24B8:
+        bufpush(0x24D2);
+        break;
+      case 0x24B9:
+        bufpush(0x24D3);
+        break;
+      case 0x24BA:
+        bufpush(0x24D4);
+        break;
+      case 0x24BB:
+        bufpush(0x24D5);
+        break;
+      case 0x24BC:
+        bufpush(0x24D6);
+        break;
+      case 0x24BD:
+        bufpush(0x24D7);
+        break;
+      case 0x24BE:
+        bufpush(0x24D8);
+        break;
+      case 0x24BF:
+        bufpush(0x24D9);
+        break;
+      case 0x24C0:
+        bufpush(0x24DA);
+        break;
+      case 0x24C1:
+        bufpush(0x24DB);
+        break;
+      case 0x24C2:
+        bufpush(0x24DC);
+        break;
+      case 0x24C3:
+        bufpush(0x24DD);
+        break;
+      case 0x24C4:
+        bufpush(0x24DE);
+        break;
+      case 0x24C5:
+        bufpush(0x24DF);
+        break;
+      case 0x24C6:
+        bufpush(0x24E0);
+        break;
+      case 0x24C7:
+        bufpush(0x24E1);
+        break;
+      case 0x24C8:
+        bufpush(0x24E2);
+        break;
+      case 0x24C9:
+        bufpush(0x24E3);
+        break;
+      case 0x24CA:
+        bufpush(0x24E4);
+        break;
+      case 0x24CB:
+        bufpush(0x24E5);
+        break;
+      case 0x24CC:
+        bufpush(0x24E6);
+        break;
+      case 0x24CD:
+        bufpush(0x24E7);
+        break;
+      case 0x24CE:
+        bufpush(0x24E8);
+        break;
+      case 0x24CF:
+        bufpush(0x24E9);
+        break;
+      case 0xFB00:
+        bufpush(0x0066);
+        bufpush(0x0066);
+        break;
+      case 0xFB01:
+        bufpush(0x0066);
+        bufpush(0x0069);
+        break;
+      case 0xFB02:
+        bufpush(0x0066);
+        bufpush(0x006C);
+        break;
+      case 0xFB03:
+        bufpush(0x0066);
+        bufpush(0x0066);
+        bufpush(0x0069);
+        break;
+      case 0xFB04:
+        bufpush(0x0066);
+        bufpush(0x0066);
+        bufpush(0x006C);
+        break;
+      case 0xFB05:
+        bufpush(0x0073);
+        bufpush(0x0074);
+        break;
+      case 0xFB06:
+        bufpush(0x0073);
+        bufpush(0x0074);
+        break;
+      case 0xFB13:
+        bufpush(0x0574);
+        bufpush(0x0576);
+        break;
+      case 0xFB14:
+        bufpush(0x0574);
+        bufpush(0x0565);
+        break;
+      case 0xFB15:
+        bufpush(0x0574);
+        bufpush(0x056B);
+        break;
+      case 0xFB16:
+        bufpush(0x057E);
+        bufpush(0x0576);
+        break;
+      case 0xFB17:
+        bufpush(0x0574);
+        bufpush(0x056D);
+        break;
+      case 0xFF21:
+        bufpush(0xFF41);
+        break;
+      case 0xFF22:
+        bufpush(0xFF42);
+        break;
+      case 0xFF23:
+        bufpush(0xFF43);
+        break;
+      case 0xFF24:
+        bufpush(0xFF44);
+        break;
+      case 0xFF25:
+        bufpush(0xFF45);
+        break;
+      case 0xFF26:
+        bufpush(0xFF46);
+        break;
+      case 0xFF27:
+        bufpush(0xFF47);
+        break;
+      case 0xFF28:
+        bufpush(0xFF48);
+        break;
+      case 0xFF29:
+        bufpush(0xFF49);
+        break;
+      case 0xFF2A:
+        bufpush(0xFF4A);
+        break;
+      case 0xFF2B:
+        bufpush(0xFF4B);
+        break;
+      case 0xFF2C:
+        bufpush(0xFF4C);
+        break;
+      case 0xFF2D:
+        bufpush(0xFF4D);
+        break;
+      case 0xFF2E:
+        bufpush(0xFF4E);
+        break;
+      case 0xFF2F:
+        bufpush(0xFF4F);
+        break;
+      case 0xFF30:
+        bufpush(0xFF50);
+        break;
+      case 0xFF31:
+        bufpush(0xFF51);
+        break;
+      case 0xFF32:
+        bufpush(0xFF52);
+        break;
+      case 0xFF33:
+        bufpush(0xFF53);
+        break;
+      case 0xFF34:
+        bufpush(0xFF54);
+        break;
+      case 0xFF35:
+        bufpush(0xFF55);
+        break;
+      case 0xFF36:
+        bufpush(0xFF56);
+        break;
+      case 0xFF37:
+        bufpush(0xFF57);
+        break;
+      case 0xFF38:
+        bufpush(0xFF58);
+        break;
+      case 0xFF39:
+        bufpush(0xFF59);
+        break;
+      case 0xFF3A:
+        bufpush(0xFF5A);
+        break;
+      case 0x10400:
+        bufpush(0x10428);
+        break;
+      case 0x10401:
+        bufpush(0x10429);
+        break;
+      case 0x10402:
+        bufpush(0x1042A);
+        break;
+      case 0x10403:
+        bufpush(0x1042B);
+        break;
+      case 0x10404:
+        bufpush(0x1042C);
+        break;
+      case 0x10405:
+        bufpush(0x1042D);
+        break;
+      case 0x10406:
+        bufpush(0x1042E);
+        break;
+      case 0x10407:
+        bufpush(0x1042F);
+        break;
+      case 0x10408:
+        bufpush(0x10430);
+        break;
+      case 0x10409:
+        bufpush(0x10431);
+        break;
+      case 0x1040A:
+        bufpush(0x10432);
+        break;
+      case 0x1040B:
+        bufpush(0x10433);
+        break;
+      case 0x1040C:
+        bufpush(0x10434);
+        break;
+      case 0x1040D:
+        bufpush(0x10435);
+        break;
+      case 0x1040E:
+        bufpush(0x10436);
+        break;
+      case 0x1040F:
+        bufpush(0x10437);
+        break;
+      case 0x10410:
+        bufpush(0x10438);
+        break;
+      case 0x10411:
+        bufpush(0x10439);
+        break;
+      case 0x10412:
+        bufpush(0x1043A);
+        break;
+      case 0x10413:
+        bufpush(0x1043B);
+        break;
+      case 0x10414:
+        bufpush(0x1043C);
+        break;
+      case 0x10415:
+        bufpush(0x1043D);
+        break;
+      case 0x10416:
+        bufpush(0x1043E);
+        break;
+      case 0x10417:
+        bufpush(0x1043F);
+        break;
+      case 0x10418:
+        bufpush(0x10440);
+        break;
+      case 0x10419:
+        bufpush(0x10441);
+        break;
+      case 0x1041A:
+        bufpush(0x10442);
+        break;
+      case 0x1041B:
+        bufpush(0x10443);
+        break;
+      case 0x1041C:
+        bufpush(0x10444);
+        break;
+      case 0x1041D:
+        bufpush(0x10445);
+        break;
+      case 0x1041E:
+        bufpush(0x10446);
+        break;
+      case 0x1041F:
+        bufpush(0x10447);
+        break;
+      case 0x10420:
+        bufpush(0x10448);
+        break;
+      case 0x10421:
+        bufpush(0x10449);
+        break;
+      case 0x10422:
+        bufpush(0x1044A);
+        break;
+      case 0x10423:
+        bufpush(0x1044B);
+        break;
+      case 0x10424:
+        bufpush(0x1044C);
+        break;
+      case 0x10425:
+        bufpush(0x1044D);
+        break;
+      default:
+        bufpush(c);
+    }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/chunk.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/chunk.h b/compiler/modules/CommonMark/src/chunk.h
new file mode 100644
index 0000000..7a1dbc3
--- /dev/null
+++ b/compiler/modules/CommonMark/src/chunk.h
@@ -0,0 +1,123 @@
+#ifndef CMARK_CHUNK_H
+#define CMARK_CHUNK_H
+
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "buffer.h"
+
+typedef struct {
+	unsigned char *data;
+	int len;
+	int alloc;  // also implies a NULL-terminated string
+} cmark_chunk;
+
+static inline void cmark_chunk_free(cmark_chunk *c)
+{
+	if (c->alloc)
+		free(c->data);
+
+	c->data = NULL;
+	c->alloc = 0;
+	c->len = 0;
+}
+
+static inline void cmark_chunk_ltrim(cmark_chunk *c)
+{
+	assert(!c->alloc);
+
+	while (c->len && isspace(c->data[0])) {
+		c->data++;
+		c->len--;
+	}
+}
+
+static inline void cmark_chunk_rtrim(cmark_chunk *c)
+{
+	while (c->len > 0) {
+		if (!isspace(c->data[c->len - 1]))
+			break;
+
+		c->len--;
+	}
+}
+
+static inline void cmark_chunk_trim(cmark_chunk *c)
+{
+	cmark_chunk_ltrim(c);
+	cmark_chunk_rtrim(c);
+}
+
+static inline int cmark_chunk_strchr(cmark_chunk *ch, int c, int offset)
+{
+	const unsigned char *p = (unsigned char *)memchr(ch->data + offset, c, ch->len - offset);
+	return p ? (int)(p - ch->data) : ch->len;
+}
+
+static inline const char *cmark_chunk_to_cstr(cmark_chunk *c)
+{
+	unsigned char *str;
+
+	if (c->alloc) {
+		return (char *)c->data;
+	}
+	str = (unsigned char *)malloc(c->len + 1);
+	if(str != NULL) {
+		memcpy(str, c->data, c->len);
+		str[c->len] = 0;
+	}
+	c->data  = str;
+	c->alloc = 1;
+
+	return (char *)str;
+}
+
+static inline void cmark_chunk_set_cstr(cmark_chunk *c, const char *str)
+{
+	if (c->alloc) {
+		free(c->data);
+	}
+	c->len   = strlen(str);
+	c->data  = (unsigned char *)malloc(c->len + 1);
+	c->alloc = 1;
+	memcpy(c->data, str, c->len + 1);
+}
+
+static inline cmark_chunk cmark_chunk_literal(const char *data)
+{
+	cmark_chunk c = {(unsigned char *)data, data ? strlen(data) : 0, 0};
+	return c;
+}
+
+static inline cmark_chunk cmark_chunk_dup(const cmark_chunk *ch, int pos, int len)
+{
+	cmark_chunk c = {ch->data + pos, len, 0};
+	return c;
+}
+
+static inline cmark_chunk cmark_chunk_buf_detach(cmark_strbuf *buf)
+{
+	cmark_chunk c;
+
+	c.len = buf->size;
+	c.data = cmark_strbuf_detach(buf);
+	c.alloc = 1;
+
+	return c;
+}
+
+#ifndef CMARK_NO_SHORT_NAMES
+  #define chunk             cmark_chunk
+  #define chunk_free        cmark_chunk_free
+  #define chunk_ltrim       cmark_chunk_ltrim
+  #define chunk_rtrim       cmark_chunk_rtrim
+  #define chunk_trim        cmark_chunk_trim
+  #define chunk_strchr      cmark_chunk_strchr
+  #define chunk_to_cstr     cmark_chunk_to_cstr
+  #define chunk_literal     cmark_chunk_literal
+  #define chunk_dup         cmark_chunk_dup
+  #define chunk_buf_detach  cmark_chunk_buf_detach
+#endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/cmark.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/cmark.c b/compiler/modules/CommonMark/src/cmark.c
new file mode 100644
index 0000000..273a37b
--- /dev/null
+++ b/compiler/modules/CommonMark/src/cmark.c
@@ -0,0 +1,22 @@
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+#include "node.h"
+#include "references.h"
+#include "html/houdini.h"
+#include "cmark.h"
+#include "buffer.h"
+
+char *cmark_markdown_to_html(const char *text, int len)
+{
+	cmark_node *blocks;
+	char *result;
+
+	blocks = cmark_parse_document(text, len);
+
+	result = cmark_render_html(blocks);
+	cmark_free_nodes(blocks);
+
+	return result;
+}
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/cmark.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/cmark.h b/compiler/modules/CommonMark/src/cmark.h
new file mode 100644
index 0000000..3c185b6
--- /dev/null
+++ b/compiler/modules/CommonMark/src/cmark.h
@@ -0,0 +1,245 @@
+#ifndef CMARK_H
+#define CMARK_H
+
+#include <stdio.h>
+#include "cmark_export.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CMARK_VERSION "0.1"
+
+typedef enum {
+    // Block
+    CMARK_NODE_DOCUMENT,
+    CMARK_NODE_BLOCK_QUOTE,
+    CMARK_NODE_LIST,
+    CMARK_NODE_LIST_ITEM,
+    CMARK_NODE_FENCED_CODE,
+    CMARK_NODE_INDENTED_CODE,
+    CMARK_NODE_HTML,
+    CMARK_NODE_PARAGRAPH,
+    CMARK_NODE_ATX_HEADER,
+    CMARK_NODE_SETEXT_HEADER,
+    CMARK_NODE_HRULE,
+    CMARK_NODE_REFERENCE_DEF,
+
+    CMARK_NODE_FIRST_BLOCK = CMARK_NODE_DOCUMENT,
+    CMARK_NODE_LAST_BLOCK  = CMARK_NODE_REFERENCE_DEF,
+
+    // Inline
+    CMARK_NODE_STRING,
+    CMARK_NODE_SOFTBREAK,
+    CMARK_NODE_LINEBREAK,
+    CMARK_NODE_INLINE_CODE,
+    CMARK_NODE_INLINE_HTML,
+    CMARK_NODE_EMPH,
+    CMARK_NODE_STRONG,
+    CMARK_NODE_LINK,
+    CMARK_NODE_IMAGE,
+
+    CMARK_NODE_FIRST_INLINE = CMARK_NODE_STRING,
+    CMARK_NODE_LAST_INLINE  = CMARK_NODE_IMAGE,
+} cmark_node_type;
+
+typedef enum {
+	CMARK_NO_LIST,
+	CMARK_BULLET_LIST,
+	CMARK_ORDERED_LIST
+}  cmark_list_type;
+
+typedef enum {
+	CMARK_PERIOD_DELIM,
+	CMARK_PAREN_DELIM
+} cmark_delim_type;
+
+typedef struct cmark_node cmark_node;
+typedef struct cmark_doc_parser cmark_doc_parser;
+
+// Construction and destruction
+
+CMARK_EXPORT cmark_node*
+cmark_node_new(cmark_node_type type);
+
+CMARK_EXPORT void
+cmark_node_destroy(cmark_node *node);
+
+CMARK_EXPORT void
+cmark_free_nodes(cmark_node *e);
+
+// Tree traversal
+
+CMARK_EXPORT cmark_node*
+cmark_node_next(cmark_node *node);
+
+CMARK_EXPORT cmark_node*
+cmark_node_previous(cmark_node *node);
+
+CMARK_EXPORT cmark_node*
+cmark_node_parent(cmark_node *node);
+
+CMARK_EXPORT cmark_node*
+cmark_node_first_child(cmark_node *node);
+
+CMARK_EXPORT cmark_node*
+cmark_node_last_child(cmark_node *node);
+
+// Accessors
+
+CMARK_EXPORT cmark_node_type
+cmark_node_get_type(cmark_node *node);
+
+CMARK_EXPORT const char*
+cmark_node_get_string_content(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_string_content(cmark_node *node, const char *content);
+
+CMARK_EXPORT int
+cmark_node_get_header_level(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_header_level(cmark_node *node, int level);
+
+CMARK_EXPORT cmark_list_type
+cmark_node_get_list_type(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_list_type(cmark_node *node, cmark_list_type type);
+
+CMARK_EXPORT int
+cmark_node_get_list_start(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_list_start(cmark_node *node, int start);
+
+CMARK_EXPORT int
+cmark_node_get_list_tight(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_list_tight(cmark_node *node, int tight);
+
+CMARK_EXPORT const char*
+cmark_node_get_fence_info(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_fence_info(cmark_node *node, const char *info);
+
+CMARK_EXPORT const char*
+cmark_node_get_url(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_url(cmark_node *node, const char *url);
+
+CMARK_EXPORT const char*
+cmark_node_get_title(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_set_title(cmark_node *node, const char *title);
+
+CMARK_EXPORT int
+cmark_node_get_start_line(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_get_start_column(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_get_end_line(cmark_node *node);
+
+// Tree manipulation
+
+CMARK_EXPORT void
+cmark_node_unlink(cmark_node *node);
+
+CMARK_EXPORT int
+cmark_node_insert_before(cmark_node *node, cmark_node *sibling);
+
+CMARK_EXPORT int
+cmark_node_insert_after(cmark_node *node, cmark_node *sibling);
+
+CMARK_EXPORT int
+cmark_node_prepend_child(cmark_node *node, cmark_node *child);
+
+CMARK_EXPORT int
+cmark_node_append_child(cmark_node *node, cmark_node *child);
+
+// Parser
+
+CMARK_EXPORT
+cmark_doc_parser *cmark_new_doc_parser();
+
+CMARK_EXPORT
+void cmark_free_doc_parser(cmark_doc_parser *parser);
+
+CMARK_EXPORT
+cmark_node *cmark_finish(cmark_doc_parser *parser);
+
+CMARK_EXPORT
+void cmark_process_line(cmark_doc_parser *parser, const char *buffer, size_t bytes);
+
+CMARK_EXPORT
+cmark_node *cmark_parse_document(const char *buffer, size_t len);
+
+CMARK_EXPORT
+cmark_node *cmark_parse_file(FILE *f);
+
+// Renderer
+
+CMARK_EXPORT
+void cmark_debug_print(cmark_node *root);
+
+CMARK_EXPORT
+char *cmark_render_html(cmark_node *root);
+
+CMARK_EXPORT
+char *cmark_markdown_to_html(const char *text, int len);
+
+#ifndef CMARK_NO_SHORT_NAMES
+  #define NODE_DOCUMENT             CMARK_NODE_DOCUMENT
+  #define NODE_BLOCK_QUOTE          CMARK_NODE_BLOCK_QUOTE
+  #define NODE_LIST                 CMARK_NODE_LIST
+  #define NODE_LIST_ITEM            CMARK_NODE_LIST_ITEM
+  #define NODE_FENCED_CODE          CMARK_NODE_FENCED_CODE
+  #define NODE_INDENTED_CODE        CMARK_NODE_INDENTED_CODE
+  #define NODE_HTML                 CMARK_NODE_HTML
+  #define NODE_PARAGRAPH            CMARK_NODE_PARAGRAPH
+  #define NODE_ATX_HEADER           CMARK_NODE_ATX_HEADER
+  #define NODE_SETEXT_HEADER        CMARK_NODE_SETEXT_HEADER
+  #define NODE_HRULE                CMARK_NODE_HRULE
+  #define NODE_REFERENCE_DEF        CMARK_NODE_REFERENCE_DEF
+  #define NODE_STRING               CMARK_NODE_STRING
+  #define NODE_SOFTBREAK            CMARK_NODE_SOFTBREAK
+  #define NODE_LINEBREAK            CMARK_NODE_LINEBREAK
+  #define NODE_INLINE_CODE          CMARK_NODE_INLINE_CODE
+  #define NODE_INLINE_HTML          CMARK_NODE_INLINE_HTML
+  #define NODE_EMPH                 CMARK_NODE_EMPH
+  #define NODE_STRONG               CMARK_NODE_STRONG
+  #define NODE_LINK                 CMARK_NODE_LINK
+  #define NODE_IMAGE                CMARK_NODE_IMAGE
+  #define NODE_LINK_LABEL           CMARK_NODE_LINK_LABEL
+  #define BULLET_LIST               CMARK_BULLET_LIST
+  #define ORDERED_LIST              CMARK_ORDERED_LIST
+  #define PERIOD_DELIM              CMARK_PERIOD_DELIM
+  #define PAREN_DELIM               CMARK_PAREN_DELIM
+  #define free_simple               cmark_free_simple
+  #define free_blocks               cmark_free_blocks
+  #define doc_parser                cmark_doc_parser
+  #define new_doc_parser            cmark_new_doc_parser
+  #define free_doc_parser           cmark_free_doc_parser
+  #define process_line              cmark_process_line
+  #define finish                    cmark_finish
+  #define block_next                cmark_block_next
+  #define block_previous            cmark_block_previous
+  #define block_parent              cmark_block_parent
+  #define block_children            cmark_block_children
+  #define block_delete              cmark_block_delete
+  #define block_insert_before       cmark_block_insert_before
+  #define block_insert_after        cmark_block_insert_after
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/cmark_export.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/cmark_export.h b/compiler/modules/CommonMark/src/cmark_export.h
new file mode 100644
index 0000000..fa14b4d
--- /dev/null
+++ b/compiler/modules/CommonMark/src/cmark_export.h
@@ -0,0 +1,7 @@
+#ifndef CMARK_EXPORT_H
+#define CMARK_EXPORT_H
+
+#define CMARK_EXPORT
+#define CMARK_NO_EXPORT
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/config.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/config.h b/compiler/modules/CommonMark/src/config.h
new file mode 100644
index 0000000..ce3064e
--- /dev/null
+++ b/compiler/modules/CommonMark/src/config.h
@@ -0,0 +1,11 @@
+#include "charmony.h"
+
+#ifdef CHY_HAS_STDBOOL_H
+# include <stdbool.h>
+#elif !defined(__cplusplus)
+typedef char bool;
+# define true 1
+# define false 0
+#endif
+
+#define CMARK_ATTRIBUTE(list)

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/config.h.in
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/config.h.in b/compiler/modules/CommonMark/src/config.h.in
new file mode 100644
index 0000000..5294bc9
--- /dev/null
+++ b/compiler/modules/CommonMark/src/config.h.in
@@ -0,0 +1,17 @@
+#cmakedefine HAVE_STDBOOL_H
+
+#ifdef HAVE_STDBOOL_H
+  #include <stdbool.h>
+#elif !defined(__cplusplus)
+  typedef char bool;
+#endif
+
+#cmakedefine HAVE___BUILTIN_EXPECT
+
+#cmakedefine HAVE___ATTRIBUTE__
+
+#ifdef HAVE___ATTRIBUTE__
+  #define CMARK_ATTRIBUTE(list) __attribute__ (list)
+#else
+  #define CMARK_ATTRIBUTE(list)
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/debug.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/debug.h b/compiler/modules/CommonMark/src/debug.h
new file mode 100644
index 0000000..fd2ef62
--- /dev/null
+++ b/compiler/modules/CommonMark/src/debug.h
@@ -0,0 +1,36 @@
+#ifndef CMARK_DEBUG_H
+#define CMARK_DEBUG_H
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#ifdef NDEBUG
+#define debug(M, ...)
+#else
+#define debug(M, ...) \
+  fprintf(stderr, "DEBUG %s:%d: " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
+#endif
+
+#define clean_errno() (errno == 0 ? "None" : strerror(errno))
+
+#define log_err(M, ...) \
+  fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \
+           clean_errno(), ##__VA_ARGS__)
+
+#define log_warn(M, ...) \
+  fprintf(stderr, "[WARN] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, \
+           clean_errno(), ##__VA_ARGS__)
+
+#define log_info(M, ...) fprintf(stderr, "[INFO] (%s:%d) " M "\n", __FILE__, \
+            __LINE__, ##__VA_ARGS__)
+
+#define check(A, M, ...) \
+  if(!(A)) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
+
+#define sentinel(M, ...) \
+   { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
+
+#define check_debug(A, M, ...) \
+  if(!(A)) { debug(M, ##__VA_ARGS__); errno=0; goto error; }
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/houdini.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/houdini.h b/compiler/modules/CommonMark/src/html/houdini.h
new file mode 100644
index 0000000..9e1200e
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/houdini.h
@@ -0,0 +1,52 @@
+#ifndef CMARK_HOUDINI_H
+#define CMARK_HOUDINI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include "config.h"
+#include "buffer.h"
+
+#ifdef HAVE___BUILTIN_EXPECT
+#	define likely(x)	__builtin_expect((x),1)
+#	define unlikely(x)	__builtin_expect((x),0)
+#else
+#	define likely(x)	(x)
+#	define unlikely(x)	(x)
+#endif
+
+#ifdef HOUDINI_USE_LOCALE
+#	define _isxdigit(c) isxdigit(c)
+#	define _isdigit(c) isdigit(c)
+#else
+/*
+ * Helper _isdigit methods -- do not trust the current locale
+ * */
+#	define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL)
+#	define _isdigit(c) ((c) >= '0' && (c) <= '9')
+#endif
+
+#define HOUDINI_ESCAPED_SIZE(x) (((x) * 12) / 10)
+#define HOUDINI_UNESCAPED_SIZE(x) (x)
+
+extern size_t houdini_unescape_ent(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_html(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_html0(strbuf *ob, const uint8_t *src, size_t size, int secure);
+extern int houdini_unescape_html(strbuf *ob, const uint8_t *src, size_t size);
+extern void houdini_unescape_html_f(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_xml(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_uri(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_url(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_href(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_unescape_uri(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_unescape_url(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_escape_js(strbuf *ob, const uint8_t *src, size_t size);
+extern int houdini_unescape_js(strbuf *ob, const uint8_t *src, size_t size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/houdini_href_e.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/houdini_href_e.c b/compiler/modules/CommonMark/src/html/houdini_href_e.c
new file mode 100644
index 0000000..12456ce
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/houdini_href_e.c
@@ -0,0 +1,107 @@
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "html/houdini.h"
+
+/*
+ * The following characters will not be escaped:
+ *
+ *		-_.+!*'(),%#@?=;:/,+&$ alphanum
+ *
+ * Note that this character set is the addition of:
+ *
+ *	- The characters which are safe to be in an URL
+ *	- The characters which are *not* safe to be in
+ *	an URL because they are RESERVED characters.
+ *
+ * We asume (lazily) that any RESERVED char that
+ * appears inside an URL is actually meant to
+ * have its native function (i.e. as an URL
+ * component/separator) and hence needs no escaping.
+ *
+ * There are two exceptions: the chacters & (amp)
+ * and ' (single quote) do not appear in the table.
+ * They are meant to appear in the URL as components,
+ * yet they require special HTML-entity escaping
+ * to generate valid HTML markup.
+ *
+ * All other characters will be escaped to %XX.
+ *
+ */
+static const char HREF_SAFE[] = {
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
+	0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+int
+houdini_escape_href(strbuf *ob, const uint8_t *src, size_t size)
+{
+	static const uint8_t hex_chars[] = "0123456789ABCDEF";
+	size_t  i = 0, org;
+	uint8_t hex_str[3];
+
+	hex_str[0] = '%';
+
+	while (i < size) {
+		org = i;
+		while (i < size && HREF_SAFE[src[i]] != 0)
+			i++;
+
+		if (likely(i > org))
+			strbuf_put(ob, src + org, i - org);
+
+		/* escaping */
+		if (i >= size)
+			break;
+
+		switch (src[i]) {
+		/* amp appears all the time in URLs, but needs
+		 * HTML-entity escaping to be inside an href */
+		case '&':
+			strbuf_puts(ob, "&amp;");
+			break;
+
+		/* the single quote is a valid URL character
+		 * according to the standard; it needs HTML
+		 * entity escaping too */
+		case '\'':
+			strbuf_puts(ob, "&#x27;");
+			break;
+
+		/* the space can be escaped to %20 or a plus
+		 * sign. we're going with the generic escape
+		 * for now. the plus thing is more commonly seen
+		 * when building GET strings */
+#if 0
+		case ' ':
+			strbuf_putc(ob, '+');
+			break;
+#endif
+
+		/* every other character goes with a %XX escaping */
+		default:
+			hex_str[1] = hex_chars[(src[i] >> 4) & 0xF];
+			hex_str[2] = hex_chars[src[i] & 0xF];
+			strbuf_put(ob, hex_str, 3);
+		}
+
+		i++;
+	}
+
+	return 1;
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/houdini_html_e.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/houdini_html_e.c b/compiler/modules/CommonMark/src/html/houdini_html_e.c
new file mode 100644
index 0000000..f2e86fe
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/houdini_html_e.c
@@ -0,0 +1,81 @@
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "html/houdini.h"
+
+/**
+ * According to the OWASP rules:
+ *
+ * & --> &amp;
+ * < --> &lt;
+ * > --> &gt;
+ * " --> &quot;
+ * ' --> &#x27;     &apos; is not recommended
+ * / --> &#x2F;     forward slash is included as it helps end an HTML entity
+ *
+ */
+static const char HTML_ESCAPE_TABLE[] = {
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 1, 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 4,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 6, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static const char *HTML_ESCAPES[] = {
+        "",
+        "&quot;",
+        "&amp;",
+        "&#39;",
+        "&#47;",
+        "&lt;",
+        "&gt;"
+};
+
+int
+houdini_escape_html0(strbuf *ob, const uint8_t *src, size_t size, int secure)
+{
+	size_t  i = 0, org, esc = 0;
+
+	while (i < size) {
+		org = i;
+		while (i < size && (esc = HTML_ESCAPE_TABLE[src[i]]) == 0)
+			i++;
+
+		if (i > org)
+			strbuf_put(ob, src + org, i - org);
+
+		/* escaping */
+		if (unlikely(i >= size))
+			break;
+
+		/* The forward slash is only escaped in secure mode */
+		if ((src[i] == '/' || src[i] == '\'') && !secure) {
+			strbuf_putc(ob, src[i]);
+		} else {
+			strbuf_puts(ob, HTML_ESCAPES[esc]);
+		}
+
+		i++;
+	}
+
+	return 1;
+}
+
+int
+houdini_escape_html(strbuf *ob, const uint8_t *src, size_t size)
+{
+	return houdini_escape_html0(ob, src, size, 1);
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/houdini_html_u.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/houdini_html_u.c b/compiler/modules/CommonMark/src/html/houdini_html_u.c
new file mode 100644
index 0000000..b88b9d1
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/houdini_html_u.c
@@ -0,0 +1,112 @@
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "buffer.h"
+#include "houdini.h"
+#include "utf8.h"
+#include "html_unescape.h"
+
+size_t
+houdini_unescape_ent(strbuf *ob, const uint8_t *src, size_t size)
+{
+	size_t i = 0;
+
+	if (size > 3 && src[0] == '#') {
+		int codepoint = 0;
+
+		if (_isdigit(src[1])) {
+			for (i = 1; i < size && _isdigit(src[i]); ++i) {
+				int cp = (codepoint * 10) + (src[i] - '0');
+
+				if (cp < codepoint)
+					return 0;
+
+				codepoint = cp;
+			}
+		}
+
+		else if (src[1] == 'x' || src[1] == 'X') {
+			for (i = 2; i < size && _isxdigit(src[i]); ++i) {
+				int cp = (codepoint * 16) + ((src[i] | 32) % 39 - 9);
+
+				if (cp < codepoint)
+					return 0;
+
+				codepoint = cp;
+			}
+		}
+
+		if (i < size && src[i] == ';' && codepoint) {
+			utf8proc_encode_char(codepoint, ob);
+			return i + 1;
+		}
+	}
+
+	else {
+		if (size > MAX_WORD_LENGTH)
+			size = MAX_WORD_LENGTH;
+
+		for (i = MIN_WORD_LENGTH; i < size; ++i) {
+			if (src[i] == ' ')
+				break;
+
+			if (src[i] == ';') {
+				const struct html_ent *entity = find_entity((char *)src, i);
+
+				if (entity != NULL) {
+					strbuf_put(ob, entity->utf8, entity->utf8_len);
+					return i + 1;
+				}
+
+				break;
+			}
+		}
+	}
+
+	return 0;
+}
+
+int
+houdini_unescape_html(strbuf *ob, const uint8_t *src, size_t size)
+{
+	size_t  i = 0, org, ent;
+
+	while (i < size) {
+		org = i;
+		while (i < size && src[i] != '&')
+			i++;
+
+		if (likely(i > org)) {
+			if (unlikely(org == 0)) {
+				if (i >= size)
+					return 0;
+
+				strbuf_grow(ob, HOUDINI_UNESCAPED_SIZE(size));
+			}
+
+			strbuf_put(ob, src + org, i - org);
+		}
+
+		/* escaping */
+		if (i >= size)
+			break;
+
+		i++;
+
+		ent = houdini_unescape_ent(ob, src + i, size - i);
+		i += ent;
+
+		/* not really an entity */
+		if (ent == 0)
+			strbuf_putc(ob, '&');
+	}
+
+	return 1;
+}
+
+void houdini_unescape_html_f(strbuf *ob, const uint8_t *src, size_t size)
+{
+	if (!houdini_unescape_html(ob, src, size))
+		strbuf_put(ob, src, size);
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/html.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/html.c b/compiler/modules/CommonMark/src/html/html.c
new file mode 100644
index 0000000..0ce4443
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/html.c
@@ -0,0 +1,361 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "config.h"
+#include "cmark.h"
+#include "node.h"
+#include "buffer.h"
+#include "html/houdini.h"
+
+// Functions to convert cmark_nodes to HTML strings.
+
+static bool
+finish_node(strbuf *html, cmark_node *node, bool tight);
+
+static void escape_html(strbuf *dest, const unsigned char *source, int length)
+{
+	if (length < 0)
+		length = strlen((char *)source);
+
+	houdini_escape_html0(dest, source, (size_t)length, 0);
+}
+
+static void escape_href(strbuf *dest, const unsigned char *source, int length)
+{
+	if (length < 0)
+		length = strlen((char *)source);
+
+	houdini_escape_href(dest, source, (size_t)length);
+}
+
+static inline void cr(strbuf *html)
+{
+	if (html->size && html->ptr[html->size - 1] != '\n')
+		strbuf_putc(html, '\n');
+}
+
+// Convert the inline children of a node to a plain string.
+static void inlines_to_plain_html(strbuf *html, cmark_node* node)
+{
+	cmark_node* cur = node->first_child;
+
+	if (cur == NULL) {
+		return;
+	}
+
+	while (true) {
+		switch(cur->type) {
+		case NODE_STRING:
+		case NODE_INLINE_CODE:
+		case NODE_INLINE_HTML:
+			escape_html(html, cur->as.literal.data, cur->as.literal.len);
+			break;
+
+		case NODE_LINEBREAK:
+		case NODE_SOFTBREAK:
+			strbuf_putc(html, ' ');
+			break;
+
+		default:
+			break;
+		}
+
+		if (cur->first_child) {
+			cur = cur->first_child;
+			continue;
+		}
+
+	next_sibling:
+		if (cur->next) {
+			cur = cur->next;
+			continue;
+		}
+		cur = cur->parent;
+		if (cur == node) {
+			break;
+		}
+		goto next_sibling;
+	}
+}
+
+
+// Convert a cmark_node to HTML.
+static void node_to_html(strbuf *html, cmark_node *node)
+{
+	cmark_node *cur;
+	char start_header[] = "<h0>";
+	bool tight = false;
+	bool visit_children;
+
+	if (node == NULL) {
+		return;
+	}
+
+	cur = node;
+	while (true) {
+		// Only NODE_IMAGE wants to skip its children.
+		visit_children = true;
+
+		switch(cur->type) {
+		case NODE_DOCUMENT:
+			break;
+
+		case NODE_PARAGRAPH:
+			if (!tight) {
+				cr(html);
+				strbuf_puts(html, "<p>");
+			}
+			break;
+
+		case NODE_BLOCK_QUOTE:
+			cr(html);
+			strbuf_puts(html, "<blockquote>\n");
+			// BLOCK_QUOTE doesn't use any of the 'as' structs,
+			// so the 'list' member can be used to store the
+			// current value of 'tight'.
+			cur->as.list.tight = tight;
+			tight = false;
+			break;
+
+		case NODE_LIST_ITEM:
+			cr(html);
+			strbuf_puts(html, "<li>");
+			break;
+
+		case NODE_LIST: {
+			cmark_list *list = &cur->as.list;
+			bool tmp;
+
+			// make sure a list starts at the beginning of the line:
+			cr(html);
+
+			if (list->list_type == CMARK_BULLET_LIST) {
+				strbuf_puts(html, "<ul>\n");
+			}
+			else if (list->start == 1) {
+				strbuf_puts(html, "<ol>\n");
+			}
+			else {
+				strbuf_printf(html, "<ol start=\"%d\">\n",
+					      list->start);
+			}
+
+			// Store the current value of 'tight' by swapping.
+			tmp = list->tight;
+			list->tight = tight;
+			tight = tmp;
+			break;
+		}
+
+		case NODE_ATX_HEADER:
+		case NODE_SETEXT_HEADER:
+			cr(html);
+			start_header[2] = '0' + cur->as.header.level;
+			strbuf_puts(html, start_header);
+			break;
+
+		case NODE_INDENTED_CODE:
+		case NODE_FENCED_CODE: {
+			strbuf *info = &cur->as.code.info;
+			cr(html);
+
+			if (cur->type != NODE_FENCED_CODE
+			    || strbuf_len(info) == 0) {
+				strbuf_puts(html, "<pre><code>");
+			}
+			else {
+				int first_tag = strbuf_strchr(info, ' ', 0);
+				if (first_tag < 0)
+					first_tag = strbuf_len(info);
+
+				strbuf_puts(html,
+					    "<pre><code class=\"language-");
+				escape_html(html, info->ptr, first_tag);
+				strbuf_puts(html, "\">");
+			}
+
+			escape_html(html, cur->string_content.ptr, cur->string_content.size);
+			break;
+		}
+
+		case NODE_HTML:
+			cr(html);
+			strbuf_put(html, cur->string_content.ptr, cur->string_content.size);
+			break;
+
+		case NODE_HRULE:
+			cr(html);
+			strbuf_puts(html, "<hr />\n");
+			break;
+
+		case NODE_REFERENCE_DEF:
+			break;
+
+		case NODE_STRING:
+			escape_html(html, cur->as.literal.data, cur->as.literal.len);
+			break;
+
+		case NODE_LINEBREAK:
+			strbuf_puts(html, "<br />\n");
+			break;
+
+		case NODE_SOFTBREAK:
+			strbuf_putc(html, '\n');
+			break;
+
+		case NODE_INLINE_CODE:
+			strbuf_puts(html, "<code>");
+			escape_html(html, cur->as.literal.data, cur->as.literal.len);
+			break;
+
+		case NODE_INLINE_HTML:
+			strbuf_put(html,
+				   cur->as.literal.data,
+				   cur->as.literal.len);
+			break;
+
+		case NODE_LINK:
+			strbuf_puts(html, "<a href=\"");
+			if (cur->as.link.url)
+				escape_href(html, cur->as.link.url, -1);
+
+			if (cur->as.link.title) {
+				strbuf_puts(html, "\" title=\"");
+				escape_html(html, cur->as.link.title, -1);
+			}
+
+			strbuf_puts(html, "\">");
+			break;
+
+		case NODE_IMAGE:
+			strbuf_puts(html, "<img src=\"");
+			if (cur->as.link.url)
+				escape_href(html, cur->as.link.url, -1);
+
+			strbuf_puts(html, "\" alt=\"");
+			inlines_to_plain_html(html, cur);
+
+			if (cur->as.link.title) {
+				strbuf_puts(html, "\" title=\"");
+				escape_html(html, cur->as.link.title, -1);
+			}
+
+			strbuf_puts(html, "\" />");
+			visit_children = false;
+			break;
+
+		case NODE_STRONG:
+			strbuf_puts(html, "<strong>");
+			break;
+
+		case NODE_EMPH:
+			strbuf_puts(html, "<em>");
+			break;
+
+		default:
+			assert(false);
+		}
+
+		if (visit_children && cur->first_child) {
+			cur = cur->first_child;
+			continue;
+		}
+
+	next_sibling:
+		tight = finish_node(html, cur, tight);
+		if (cur == node) {
+			break;
+		}
+		if (cur->next) {
+			cur = cur->next;
+			continue;
+		}
+		cur = cur->parent;
+		goto next_sibling;
+	}
+}
+
+// Returns the restored value of 'tight'.
+static bool
+finish_node(strbuf *html, cmark_node *node, bool tight)
+{
+	char end_header[] = "</h0>\n";
+
+	switch (node->type) {
+	case NODE_PARAGRAPH:
+		if (!tight) {
+			strbuf_puts(html, "</p>\n");
+		}
+		break;
+
+	case NODE_BLOCK_QUOTE: {
+		cmark_list *list = &node->as.list;
+		strbuf_puts(html, "</blockquote>\n");
+		// Restore old 'tight' value.
+		tight = list->tight;
+		list->tight = false;
+		break;
+	}
+
+	case NODE_LIST_ITEM:
+		strbuf_puts(html, "</li>\n");
+		break;
+
+	case NODE_LIST: {
+		cmark_list *list = &node->as.list;
+		bool tmp;
+		strbuf_puts(html,
+			    list->list_type == CMARK_BULLET_LIST ?
+			    "</ul>\n" : "</ol>\n");
+		// Restore old 'tight' value.
+		tmp = tight;
+		tight = list->tight;
+		list->tight = tmp;
+		break;
+	}
+
+	case NODE_ATX_HEADER:
+	case NODE_SETEXT_HEADER:
+		end_header[3] = '0' + node->as.header.level;
+		strbuf_puts(html, end_header);
+		break;
+
+	case NODE_INDENTED_CODE:
+	case NODE_FENCED_CODE:
+		strbuf_puts(html, "</code></pre>\n");
+		break;
+
+	case NODE_INLINE_CODE:
+		strbuf_puts(html, "</code>");
+		break;
+
+	case NODE_LINK:
+		strbuf_puts(html, "</a>");
+		break;
+
+	case NODE_STRONG:
+		strbuf_puts(html, "</strong>");
+		break;
+
+	case NODE_EMPH:
+		strbuf_puts(html, "</em>");
+		break;
+
+	default:
+		break;
+	}
+
+	return tight;
+}
+
+char *cmark_render_html(cmark_node *root)
+{
+	char *result;
+	strbuf html = GH_BUF_INIT;
+	node_to_html(&html, root);
+	result = (char *)strbuf_detach(&html);
+	strbuf_free(&html);
+	return result;
+}


[16/16] lucy-clownfish git commit: Create HTML documentation for C API

Posted by nw...@apache.org.
Create HTML documentation for C API


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/fca91dce
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/fca91dce
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/fca91dce

Branch: refs/heads/markdown
Commit: fca91dcec74c99046a94ee9072f5525c7fc36e2b
Parents: a4c0106
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 23:32:16 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 18:35:49 2014 +0100

----------------------------------------------------------------------
 compiler/c/cfc.c        |   1 +
 compiler/src/CFCC.c     | 186 ++++++++++---
 compiler/src/CFCC.h     |   5 +
 compiler/src/CFCCHTML.c | 602 +++++++++++++++++++++++++++++++++++++++++++
 compiler/src/CFCCHTML.h |  42 +++
 5 files changed, 807 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fca91dce/compiler/c/cfc.c
----------------------------------------------------------------------
diff --git a/compiler/c/cfc.c b/compiler/c/cfc.c
index ae8828f..6460e53 100644
--- a/compiler/c/cfc.c
+++ b/compiler/c/cfc.c
@@ -239,6 +239,7 @@ main(int argc, char **argv) {
     CFCC_write_hostdefs(c_binding);
     if (args.num_source_dirs != 0) {
         CFCC_write_callbacks(c_binding);
+        CFCC_write_html_docs(c_binding);
         CFCC_write_man_pages(c_binding);
     }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fca91dce/compiler/src/CFCC.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCC.c b/compiler/src/CFCC.c
index 067e84e..6bd7165 100644
--- a/compiler/src/CFCC.c
+++ b/compiler/src/CFCC.c
@@ -16,16 +16,21 @@
 
 #include "charmony.h"
 
+#include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #define CFC_NEED_BASE_STRUCT_DEF
 #include "CFCBase.h"
 #include "CFCC.h"
+#include "CFCCHTML.h"
 #include "CFCCMan.h"
 #include "CFCClass.h"
 #include "CFCHierarchy.h"
 #include "CFCMethod.h"
+#include "CFCParcel.h"
+#include "CFCSymbol.h"
 #include "CFCUtil.h"
 
 struct CFCC {
@@ -46,6 +51,12 @@ static const CFCMeta CFCC_META = {
 static char*
 S_callback_decs(CFCClass *klass);
 
+static int
+S_compare_class_name(const void *va, const void *vb);
+
+static void
+S_write_html_docs(CFCC *self, CFCParcel *parcel, CFCClass **classes);
+
 CFCC*
 CFCC_new(CFCHierarchy *hierarchy, const char *header, const char *footer) {
     CFCC *self = (CFCC*)CFCBase_allocate(&CFCC_META);
@@ -145,6 +156,151 @@ S_callback_decs(CFCClass *klass) {
 }
 
 void
+CFCC_write_hostdefs(CFCC *self) {
+    const char pattern[] =
+        "%s\n"
+        "\n"
+        "#ifndef H_CFISH_HOSTDEFS\n"
+        "#define H_CFISH_HOSTDEFS 1\n"
+        "\n"
+        "#define CFISH_OBJ_HEAD \\\n"
+        "    size_t refcount;\n"
+        "\n"
+        "#endif /* H_CFISH_HOSTDEFS */\n"
+        "\n"
+        "%s\n";
+    char *content
+        = CFCUtil_sprintf(pattern, self->c_header, self->c_footer);
+
+    // Unlink then write file.
+    const char *inc_dest = CFCHierarchy_get_include_dest(self->hierarchy);
+    char *filepath = CFCUtil_sprintf("%s" CHY_DIR_SEP "cfish_hostdefs.h",
+                                     inc_dest);
+    remove(filepath);
+    CFCUtil_write_file(filepath, content, strlen(content));
+    FREEMEM(filepath);
+
+    FREEMEM(content);
+}
+
+void
+CFCC_write_html_docs(CFCC *self) {
+    CFCHierarchy  *hierarchy = self->hierarchy;
+    CFCClass     **ordered   = CFCHierarchy_ordered_classes(hierarchy);
+    CFCParcel    **parcels   = CFCParcel_all_parcels();
+
+    size_t num_classes = 0;
+    for (size_t i = 0; ordered[i] != NULL; i++) {
+        ++num_classes;
+    }
+
+    qsort(ordered, num_classes, sizeof(*ordered), S_compare_class_name);
+
+    for (size_t i = 0; parcels[i] != NULL; ++i) {
+        CFCParcel *parcel = parcels[i];
+        if (!CFCParcel_included(parcel)) {
+            S_write_html_docs(self, parcel, ordered);
+        }
+    }
+
+    FREEMEM(ordered);
+}
+
+static int
+S_compare_class_name(const void *va, const void *vb) {
+    const char *a = CFCClass_get_class_name(*(CFCClass**)va);
+    const char *b = CFCClass_get_class_name(*(CFCClass**)vb);
+
+    return strcmp(a, b);
+}
+
+static void
+S_write_html_docs(CFCC *self, CFCParcel *parcel, CFCClass **classes) {
+    CFCHierarchy *hierarchy = self->hierarchy;
+    const char   *prefix    = CFCParcel_get_prefix(parcel);
+
+    size_t num_classes = 0;
+    for (size_t i = 0; classes[i] != NULL; i++) {
+        CFCClass *klass = classes[i];
+        if (strcmp(CFCClass_get_prefix(klass), prefix) != 0
+            || !CFCSymbol_public((CFCSymbol*)klass)
+        ) {
+            continue;
+        }
+        ++num_classes;
+    }
+
+    if (num_classes == 0) { return; }
+
+    size_t max_docs = num_classes + 1;
+    char **html_docs = (char**)CALLOCATE(max_docs, sizeof(char*));
+    size_t num_docs = 0;
+
+    html_docs[num_docs++] = CFCCHTML_create_index_doc(parcel, classes);
+
+    // Generate HTML docs, but don't write.  That way, if there's an error
+    // while generating the pages, we leak memory but don't clutter up the file
+    // system.
+    for (size_t i = 0; classes[i] != NULL; i++) {
+        CFCClass *klass = classes[i];
+        if (strcmp(CFCClass_get_prefix(klass), prefix) != 0
+            || !CFCSymbol_public((CFCSymbol*)klass)
+        ) {
+            continue;
+        }
+        html_docs[num_docs++] = CFCCHTML_create_html_doc(klass);
+    }
+
+    const char *dest = CFCHierarchy_get_dest(hierarchy);
+    char *doc_path
+        = CFCUtil_sprintf("%s" CHY_DIR_SEP "share" CHY_DIR_SEP "doc"
+                          CHY_DIR_SEP "clownfish", dest);
+    if (!CFCUtil_is_dir(doc_path)) {
+        CFCUtil_make_path(doc_path);
+        if (!CFCUtil_is_dir(doc_path)) {
+            CFCUtil_die("Can't make path %s", doc_path);
+        }
+    }
+
+    num_docs = 0;
+
+    {
+        char *html_doc = html_docs[num_docs++];
+        char *nickname = CFCUtil_strdup(CFCParcel_get_nickname(parcel));
+        for (size_t i = 0; nickname[i]; ++i) {
+            nickname[i] = tolower(nickname[i]);
+        }
+        char *filename = CFCUtil_sprintf("%s" CHY_DIR_SEP "%s.html", doc_path,
+                                         nickname);
+        CFCUtil_write_if_changed(filename, html_doc, strlen(html_doc));
+        FREEMEM(filename);
+        FREEMEM(nickname);
+        FREEMEM(html_doc);
+    }
+
+    // Write out any HTML docs that have changed.
+    for (size_t i = 0; classes[i] != NULL; i++) {
+        CFCClass *klass = classes[i];
+        if (strcmp(CFCClass_get_prefix(klass), prefix) != 0
+            || !CFCSymbol_public((CFCSymbol*)klass)
+        ) {
+            continue;
+        }
+
+        char *html_doc = html_docs[num_docs++];
+        const char *full_struct_sym = CFCClass_full_struct_sym(klass);
+        char *filename = CFCUtil_sprintf("%s" CHY_DIR_SEP "%s.html", doc_path,
+                                         full_struct_sym);
+        CFCUtil_write_if_changed(filename, html_doc, strlen(html_doc));
+        FREEMEM(filename);
+        FREEMEM(html_doc);
+    }
+
+    FREEMEM(doc_path);
+    FREEMEM(html_docs);
+}
+
+void
 CFCC_write_man_pages(CFCC *self) {
     CFCHierarchy  *hierarchy = self->hierarchy;
     CFCClass     **ordered   = CFCHierarchy_ordered_classes(hierarchy);
@@ -157,7 +313,7 @@ CFCC_write_man_pages(CFCC *self) {
     char **man_pages = (char**)CALLOCATE(num_classes, sizeof(char*));
 
     // Generate man pages, but don't write.  That way, if there's an error
-    // while generating the pages, we leak memory but don't clutter up the file 
+    // while generating the pages, we leak memory but don't clutter up the file
     // system.
     for (size_t i = 0, j = 0; ordered[i] != NULL; i++) {
         CFCClass *klass = ordered[i];
@@ -201,32 +357,4 @@ CFCC_write_man_pages(CFCC *self) {
     FREEMEM(ordered);
 }
 
-void
-CFCC_write_hostdefs(CFCC *self) {
-    const char pattern[] =
-        "%s\n"
-        "\n"
-        "#ifndef H_CFISH_HOSTDEFS\n"
-        "#define H_CFISH_HOSTDEFS 1\n"
-        "\n"
-        "#define CFISH_OBJ_HEAD \\\n"
-        "    size_t refcount;\n"
-        "\n"
-        "#endif /* H_CFISH_HOSTDEFS */\n"
-        "\n"
-        "%s\n";
-    char *content
-        = CFCUtil_sprintf(pattern, self->c_header, self->c_footer);
-
-    // Unlink then write file.
-    const char *inc_dest = CFCHierarchy_get_include_dest(self->hierarchy);
-    char *filepath = CFCUtil_sprintf("%s" CHY_DIR_SEP "cfish_hostdefs.h",
-                                     inc_dest);
-    remove(filepath);
-    CFCUtil_write_file(filepath, content, strlen(content));
-    FREEMEM(filepath);
-
-    FREEMEM(content);
-}
-
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fca91dce/compiler/src/CFCC.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCC.h b/compiler/src/CFCC.h
index 6f665ed..c52ebae 100644
--- a/compiler/src/CFCC.h
+++ b/compiler/src/CFCC.h
@@ -54,6 +54,11 @@ CFCC_write_callbacks(CFCC *self);
 void
 CFCC_write_hostdefs(CFCC *self);
 
+/** Write the HTML documentation.
+ */
+void
+CFCC_write_html_docs(CFCC *self);
+
 /** Write all man pages.
  */
 void

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fca91dce/compiler/src/CFCCHTML.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCHTML.c b/compiler/src/CFCCHTML.c
new file mode 100644
index 0000000..12ebbab
--- /dev/null
+++ b/compiler/src/CFCCHTML.c
@@ -0,0 +1,602 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+
+#include <cmark.h>
+
+#include "charmony.h"
+#include "CFCCHTML.h"
+#include "CFCClass.h"
+#include "CFCDocuComment.h"
+#include "CFCFunction.h"
+#include "CFCMethod.h"
+#include "CFCParamList.h"
+#include "CFCParcel.h"
+#include "CFCSymbol.h"
+#include "CFCType.h"
+#include "CFCUtil.h"
+#include "CFCVariable.h"
+
+#ifndef true
+    #define true 1
+    #define false 0
+#endif
+
+// TODO: Pass HTML header and footer as option.
+
+static const char html_header[] =
+    "<!DOCTYPE html>\n"
+    "<html>\n"
+    "<head>\n"
+    "<meta name=\"viewport\" content=\"width=device-width\" />\n"
+    "<style type=\"text/css\">\n"
+    "body {\n"
+    "    font-family: sans-serif;\n"
+    "    font-size: 0.85em;\n"
+    "    max-width: 640px;\n"
+    "}\n"
+    "dt {\n"
+    "    font-weight: bold;\n"
+    "}\n"
+    "pre {\n"
+    "    border: 1px solid #000;\n"
+    "    padding: 0.2em 0.4em;\n"
+    "    background: #f6f6f6;\n"
+    "    font-size: 1.2em;\n"
+    "}\n"
+    "code {\n"
+    "    font-family: \"Consolas\", \"Menlo\", monospace;\n"
+    "}\n"
+    "</style>\n"
+    "</head>\n"
+    "<body>\n";
+
+static const char html_footer[] =
+    "</body>\n"
+    "</html>\n";
+
+static char*
+S_html_create_name(CFCClass *klass);
+
+static char*
+S_html_create_synopsis(CFCClass *klass);
+
+static char*
+S_html_create_description(CFCClass *klass);
+
+static char*
+S_html_create_functions(CFCClass *klass);
+
+static char*
+S_html_create_methods(CFCClass *klass);
+
+static char*
+S_html_create_inherited_methods(CFCClass *klass);
+
+static char*
+S_html_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
+                  const char *full_sym);
+
+static char*
+S_html_create_param_list(CFCClass *klass, CFCFunction *func,
+                         const char *full_sym);
+
+static char*
+S_html_create_inheritance(CFCClass *klass);
+
+static char*
+S_md_to_html(const char *md);
+
+static void
+S_convert_uris(cmark_node *node);
+
+static void
+S_convert_uri(cmark_node *link);
+
+static char*
+S_type_to_html(CFCClass *klass, CFCType *type);
+
+char*
+CFCCHTML_create_index_doc(CFCParcel *parcel, CFCClass **classes) {
+    const char *prefix      = CFCParcel_get_prefix(parcel);
+    const char *parcel_name = CFCParcel_get_name(parcel);
+    char *class_list = CFCUtil_strdup("");
+
+    for (size_t i = 0; classes[i] != NULL; i++) {
+        CFCClass *klass = classes[i];
+        if (strcmp(CFCClass_get_prefix(klass), prefix) != 0
+            || !CFCSymbol_public((CFCSymbol*)klass)
+        ) {
+            continue;
+        }
+
+        const char *struct_sym = CFCClass_full_struct_sym(klass);
+        const char *class_name = CFCClass_get_class_name(klass);
+        class_list
+            = CFCUtil_cat(class_list, "<li><a href=\"", struct_sym, ".html\">",
+                          class_name, "</a></li>\n", NULL);
+    }
+
+    const char pattern[] =
+        "%s"
+        "<h1>C API documentation for %s</h1>\n"
+        "<ul>\n"
+        "%s"
+        "</ul>\n"
+        "%s";
+    char *html_doc
+        = CFCUtil_sprintf(pattern, html_header, parcel_name, class_list,
+                          html_footer);
+
+    FREEMEM(class_list);
+
+    return html_doc;
+}
+
+char*
+CFCCHTML_create_html_doc(CFCClass *klass) {
+    const char *class_name = CFCClass_get_class_name(klass);
+
+    // Create NAME.
+    char *name = S_html_create_name(klass);
+
+    // Create SYNOPSIS.
+    char *synopsis = S_html_create_synopsis(klass);
+
+    // Create DESCRIPTION.
+    char *description = S_html_create_description(klass);
+
+    // Create CONSTRUCTORS.
+    char *functions_html = S_html_create_functions(klass);
+
+    // Create METHODS, possibly including an ABSTRACT METHODS section.
+    char *methods_html = S_html_create_methods(klass);
+
+    // Build an INHERITANCE section describing class ancestry.
+    char *inheritance = S_html_create_inheritance(klass);
+
+    // Put it all together.
+    const char pattern[] =
+        "%s"
+        "<h1>%s</h1>\n"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
+        "%s";
+    char *html_doc
+        = CFCUtil_sprintf(pattern, html_header, class_name, name, synopsis,
+                          description, functions_html, methods_html,
+                          inheritance, html_footer);
+
+    FREEMEM(name);
+    FREEMEM(synopsis);
+    FREEMEM(description);
+    FREEMEM(functions_html);
+    FREEMEM(methods_html);
+    FREEMEM(inheritance);
+
+    return html_doc;
+}
+
+static char*
+S_html_create_name(CFCClass *klass) {
+    const char     *class_name = CFCClass_get_class_name(klass);
+    char           *md         = CFCUtil_strdup(class_name);;
+    CFCDocuComment *docucom    = CFCClass_get_docucomment(klass);
+
+    if (docucom) {
+        const char *raw_brief = CFCDocuComment_get_brief(docucom);
+        if (raw_brief && raw_brief[0] != '\0') {
+            md = CFCUtil_cat(md, " - ", raw_brief, NULL);
+        }
+    }
+
+    char *html = S_md_to_html(md);
+
+    const char *format =
+        "<h2>Name</h2>\n"
+        "%s";
+    char *result = CFCUtil_sprintf(format, html);
+
+    FREEMEM(html);
+    return result;
+}
+
+static char*
+S_html_create_synopsis(CFCClass *klass) {
+    CHY_UNUSED_VAR(klass);
+    return CFCUtil_strdup("");
+}
+
+static char*
+S_html_create_description(CFCClass *klass) {
+    CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
+    char           *desc    = NULL;
+
+    if (docucom) {
+        const char *raw_desc = CFCDocuComment_get_long(docucom);
+        if (raw_desc && raw_desc[0] != '\0') {
+            desc = S_md_to_html(raw_desc);
+        }
+    }
+
+    if (!desc) { return CFCUtil_strdup(""); }
+
+    char *result = CFCUtil_sprintf("<h2>Description</h2>\n%s", desc);
+
+    FREEMEM(desc);
+    return result;
+}
+
+static char*
+S_html_create_functions(CFCClass *klass) {
+    CFCFunction **functions = CFCClass_functions(klass);
+    char         *result    = CFCUtil_strdup("");
+
+    for (int func_num = 0; functions[func_num] != NULL; func_num++) {
+        CFCFunction *func = functions[func_num];
+        if (!CFCFunction_public(func)) { continue; }
+
+        if (result[0] == '\0') {
+            result = CFCUtil_cat(result, "<h2>Functions</h2>\n<dl>\n", NULL);
+        }
+
+        const char *micro_sym     = CFCFunction_micro_sym(func);
+        const char *full_func_sym = CFCFunction_full_func_sym(func);
+
+        char *func_html = S_html_create_func(klass, func, micro_sym,
+                                             full_func_sym);
+        result = CFCUtil_cat(result, func_html, NULL);
+        FREEMEM(func_html);
+    }
+
+    if (result[0] != '\0') {
+        result = CFCUtil_cat(result, "</dl>\n", NULL);
+    }
+
+    return result;
+}
+
+static char*
+S_html_create_methods(CFCClass *klass) {
+    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
+    char       *methods_html   = CFCUtil_strdup("");
+    char       *novel_html     = CFCUtil_strdup("");
+    char       *result;
+
+    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
+        CFCMethod *method = fresh_methods[meth_num];
+        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
+            continue;
+        }
+
+        const char *macro_sym = CFCMethod_get_macro_sym(method);
+        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
+        char *method_html = S_html_create_func(klass, (CFCFunction*)method,
+                                               macro_sym, full_method_sym);
+
+        if (CFCMethod_abstract(method)) {
+            if (methods_html[0] == '\0') {
+                methods_html = CFCUtil_cat(methods_html,
+                                          "<h3>Abstract methods</h3>\n<dl>\n",
+                                          NULL);
+            }
+            methods_html = CFCUtil_cat(methods_html, method_html, NULL);
+        }
+        else {
+            if (novel_html[0] == '\0') {
+                novel_html = CFCUtil_cat(novel_html,
+                                        "<h3>Novel methods</h3>\n<dl>\n",
+                                        NULL);
+            }
+            novel_html = CFCUtil_cat(novel_html, method_html, NULL);
+        }
+
+        FREEMEM(method_html);
+        FREEMEM(full_method_sym);
+    }
+
+    if (methods_html[0] != '\0') {
+        methods_html = CFCUtil_cat(methods_html, "</dl>\n", NULL);
+    }
+    if (novel_html[0] != '\0') {
+        novel_html = CFCUtil_cat(novel_html, "</dl>\n", NULL);
+    }
+
+    methods_html = CFCUtil_cat(methods_html, novel_html, NULL);
+
+    // Add methods from parent classes excluding Clownfish::Obj
+    CFCClass *parent = CFCClass_get_parent(klass);
+    while (parent) {
+        if (strcmp(CFCClass_get_class_name(parent), "Clownfish::Obj") == 0) {
+            break;
+        }
+        char *inherited_html = S_html_create_inherited_methods(parent);
+        methods_html = CFCUtil_cat(methods_html, inherited_html, NULL);
+        FREEMEM(inherited_html);
+        parent = CFCClass_get_parent(parent);
+    }
+
+    if (methods_html[0] == '\0') {
+        result = CFCUtil_strdup("");
+    }
+    else {
+        result = CFCUtil_sprintf("<h2>Methods</h2>\n%s", methods_html);
+    }
+
+    FREEMEM(methods_html);
+    FREEMEM(novel_html);
+    FREEMEM(fresh_methods);
+    return result;
+}
+
+static char*
+S_html_create_inherited_methods(CFCClass *klass) {
+    CFCMethod **fresh_methods = CFCClass_fresh_methods(klass);
+    char       *result        = CFCUtil_strdup("");
+
+    for (int meth_num = 0; fresh_methods[meth_num] != NULL; meth_num++) {
+        CFCMethod *method = fresh_methods[meth_num];
+        if (!CFCMethod_public(method) || !CFCMethod_novel(method)) {
+            continue;
+        }
+
+        if (result[0] == '\0') {
+            result = CFCUtil_cat(result, "<h3>Methods inherited from ",
+                                 CFCClass_get_class_name(klass),
+                                 "</h3><dl>\n",
+                                 NULL);
+        }
+
+        const char *macro_sym = CFCMethod_get_macro_sym(method);
+        char *full_method_sym = CFCMethod_full_method_sym(method, NULL);
+        char *method_html = S_html_create_func(klass, (CFCFunction*)method,
+                                               macro_sym, full_method_sym);
+        result = CFCUtil_cat(result, method_html, NULL);
+
+        FREEMEM(method_html);
+        FREEMEM(full_method_sym);
+    }
+
+    if (result[0] != '\0') {
+        result = CFCUtil_cat(result, "</dl>\n", NULL);
+    }
+
+    FREEMEM(fresh_methods);
+    return result;
+}
+
+static char*
+S_html_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
+                  const char *full_sym) {
+    CFCType    *return_type      = CFCFunction_get_return_type(func);
+    char       *return_type_html = S_type_to_html(klass, return_type);
+    const char *incremented      = "";
+
+    if (CFCType_incremented(return_type)) {
+        incremented = " // incremented";
+    }
+
+    char *param_list = S_html_create_param_list(klass, func, full_sym);
+
+    const char *pattern =
+        "<dt>%s</dt>\n"
+        "<dd>\n"
+        "<pre><code>%s%s\n"
+        "%s</code></pre>\n";
+    char *result = CFCUtil_sprintf(pattern, short_sym, return_type_html,
+                                   incremented, param_list);
+
+    FREEMEM(param_list);
+
+    // Get documentation, which may be inherited.
+    CFCDocuComment *docucomment = CFCFunction_get_docucomment(func);
+    if (!docucomment) {
+        const char *micro_sym = CFCFunction_micro_sym(func);
+        CFCClass *parent = klass;
+        while (NULL != (parent = CFCClass_get_parent(parent))) {
+            CFCFunction *parent_func
+                = (CFCFunction*)CFCClass_method(parent, micro_sym);
+            if (!parent_func) { break; }
+            docucomment = CFCFunction_get_docucomment(parent_func);
+            if (docucomment) { break; }
+        }
+    }
+
+    if (docucomment) {
+        // Description
+        const char *raw_desc = CFCDocuComment_get_description(docucomment);
+        char *desc = S_md_to_html(raw_desc);
+        result = CFCUtil_cat(result, desc, NULL);
+        FREEMEM(desc);
+
+        // Params
+        const char **param_names
+            = CFCDocuComment_get_param_names(docucomment);
+        const char **param_docs
+            = CFCDocuComment_get_param_docs(docucomment);
+        if (param_names[0]) {
+            result = CFCUtil_cat(result, "<dl>\n", NULL);
+            for (size_t i = 0; param_names[i] != NULL; i++) {
+                char *doc = S_md_to_html(param_docs[i]);
+                result = CFCUtil_cat(result, "<dt><emph>", param_names[i],
+                                     "</emph></dt>\n<dd>", doc, "</dd>\n",
+                                     NULL);
+                FREEMEM(doc);
+            }
+            result = CFCUtil_cat(result, "</dl>\n", NULL);
+        }
+
+        // Return value
+        const char *retval_doc = CFCDocuComment_get_retval(docucomment);
+        if (retval_doc && strlen(retval_doc)) {
+            char *md = CFCUtil_sprintf("**Returns:** %s", retval_doc);
+            char *html = S_md_to_html(md);
+            result = CFCUtil_cat(result, html, NULL);
+            FREEMEM(html);
+            FREEMEM(md);
+        }
+    }
+
+    result = CFCUtil_cat(result, "</dd>\n", NULL);
+
+    FREEMEM(return_type_html);
+    return result;
+}
+
+static char*
+S_html_create_param_list(CFCClass *klass, CFCFunction *func,
+                         const char *full_sym) {
+    CFCParamList  *param_list = CFCFunction_get_param_list(func);
+    CFCVariable  **variables  = CFCParamList_get_variables(param_list);
+
+    if (!variables[0]) {
+        return CFCUtil_sprintf("<strong>%s</strong>(void);\n", full_sym);
+    }
+
+    char *result = CFCUtil_sprintf("<strong>%s</strong>(", full_sym);
+
+    for (int i = 0; variables[i]; ++i) {
+        CFCVariable *variable  = variables[i];
+        CFCType     *type      = CFCVariable_get_type(variable);
+        char        *type_html = S_type_to_html(klass, type);
+        const char  *name      = CFCVariable_micro_sym(variable);
+
+        result = CFCUtil_cat(result, "\n    ", type_html, " <strong>", name,
+                             "</strong>", NULL);
+
+        if (variables[i+1]) {
+            result = CFCUtil_cat(result, ",", NULL);
+        }
+        if (CFCType_decremented(type)) {
+            result = CFCUtil_cat(result, " // decremented", NULL);
+        }
+
+        FREEMEM(type_html);
+    }
+
+    result = CFCUtil_cat(result, "\n);\n", NULL);
+
+    return result;
+}
+
+static char*
+S_html_create_inheritance(CFCClass *klass) {
+    CFCClass *ancestor = CFCClass_get_parent(klass);
+    char     *result   = CFCUtil_strdup("");
+
+    if (!ancestor) { return result; }
+
+    const char *class_name = CFCClass_get_class_name(klass);
+    result = CFCUtil_cat(result, "<h2>Inheritance</h2>\n<p>", class_name,
+                         NULL);
+    while (ancestor) {
+        const char *ancestor_name = CFCClass_get_class_name(ancestor);
+        const char *ancestor_sym  = CFCClass_full_struct_sym(ancestor);
+        result = CFCUtil_cat(result, " is a <a href=\"", ancestor_sym,
+                             ".html\">", ancestor_name, "</a>", NULL);
+        ancestor = CFCClass_get_parent(ancestor);
+    }
+    result = CFCUtil_cat(result, ".</p>\n", NULL);
+
+    return result;
+}
+
+static char*
+S_md_to_html(const char *md) {
+    cmark_node *doc = cmark_parse_document(md, strlen(md));
+    S_convert_uris(doc);
+    char *html = cmark_render_html(doc);
+    cmark_node_destroy(doc);
+
+    return html;
+}
+
+static void
+S_convert_uris(cmark_node *node) {
+    cmark_node *cur = node;
+
+    while (true) {
+        cmark_node_type type = cmark_node_get_type(cur);
+
+        if (type == NODE_LINK) {
+            S_convert_uri(cur);
+        }
+
+        cmark_node *child = cmark_node_first_child(cur);
+        if (child) {
+            cur = child;
+            continue;
+        }
+
+    next_sibling:
+        if (cur == node) { break; }
+        cmark_node *next = cmark_node_next(cur);
+        if (next) {
+            cur = next;
+            continue;
+        }
+        cur = cmark_node_parent(cur);
+        goto next_sibling;
+    }
+}
+
+static void
+S_convert_uri(cmark_node *link) {
+    const char *uri = cmark_node_get_url(link);
+    if (!uri || memcmp(uri, "clownfish:", 10) != 0) {
+        return;
+    }
+    if (memcmp(uri, "clownfish:class:", 16) != 0) {
+        CFCUtil_die("Invalid clownfish URI: %s", uri);
+    }
+
+    // Convert 'clownfish:class:{parcel}:{name}' to '{parcel}_{name}.html'
+    const char *src   = uri + 16;
+    const char *colon = strchr(src, ':');
+    if (!colon) {
+        CFCUtil_die("Invalid clownfish URI: %s", uri);
+    }
+    size_t src_len = strlen(src);
+    char *new_uri = (char*)MALLOCATE(src_len + 5 + 1);
+    strcpy(new_uri, src);
+    new_uri[colon-src] = '_';
+    strcpy(new_uri + src_len, ".html");
+
+    cmark_node_set_url(link, new_uri);
+    FREEMEM(new_uri);
+}
+
+static char*
+S_type_to_html(CFCClass *klass, CFCType *type) {
+    const char *type_c = CFCType_to_c(type);
+
+    if (CFCType_is_object(type)) {
+        const char *struct_sym = CFCClass_full_struct_sym(klass);
+        const char *specifier  = CFCType_get_specifier(type);
+        if (strcmp(specifier, struct_sym) != 0) {
+            return CFCUtil_sprintf("<a href=\"%s.html\">%s</a>", specifier,
+                                   type_c);
+        }
+    }
+
+    return CFCUtil_strdup(type_c);
+}
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/fca91dce/compiler/src/CFCCHTML.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCHTML.h b/compiler/src/CFCCHTML.h
new file mode 100644
index 0000000..f340321
--- /dev/null
+++ b/compiler/src/CFCCHTML.h
@@ -0,0 +1,42 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef H_CFCCHTML
+#define H_CFCCHTML
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct CFCClass;
+struct CFCParcel;
+
+/** Return the index document of the HTML documentation.
+ */
+char*
+CFCCHTML_create_index_doc(struct CFCParcel *parcel, struct CFCClass **classes);
+
+/** Return the HTML documentation for the class.
+ */
+char*
+CFCCHTML_create_html_doc(struct CFCClass *klass);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_CFCCHTML */
+


[03/16] lucy-clownfish git commit: Switch man page creator to Markdown

Posted by nw...@apache.org.
Switch man page creator to Markdown


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/95e36dbf
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/95e36dbf
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/95e36dbf

Branch: refs/heads/markdown
Commit: 95e36dbf5439b425f39558c935ce9d723b6ce546
Parents: 4916920
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 16:38:23 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:56 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCCMan.c | 354 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 264 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/95e36dbf/compiler/src/CFCCMan.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCMan.c b/compiler/src/CFCCMan.c
index 17ad340..ef0f0b5 100644
--- a/compiler/src/CFCCMan.c
+++ b/compiler/src/CFCCMan.c
@@ -16,6 +16,8 @@
 
 #include <string.h>
 
+#include <cmark.h>
+
 #include "charmony.h"
 #include "CFCCMan.h"
 #include "CFCClass.h"
@@ -33,12 +35,6 @@
     #define false 0
 #endif
 
-typedef struct CFCPodLink {
-    size_t      total_size;
-    const char *text;
-    size_t      text_size;
-} CFCPodLink;
-
 static char*
 S_man_create_name(CFCClass *klass);
 
@@ -68,10 +64,13 @@ static char*
 S_man_create_inheritance(CFCClass *klass);
 
 static char*
-S_man_escape_content(const char *content);
+S_md_to_man(const char *md, int needs_indent);
+
+static char*
+S_nodes_to_man(cmark_node *node, int needs_indent);
 
-static void
-S_parse_pod_link(const char *content, CFCPodLink *pod_link);
+static char*
+S_man_escape(const char *content);
 
 char*
 CFCCMan_create_man_page(CFCClass *klass) {
@@ -125,17 +124,19 @@ S_man_create_name(CFCClass *klass) {
     char *result = CFCUtil_strdup(".SH NAME\n");
     result = CFCUtil_cat(result, CFCClass_get_class_name(klass), NULL);
 
+    const char *raw_brief = NULL;
     CFCDocuComment *docucom = CFCClass_get_docucomment(klass);
     if (docucom) {
-        const char *raw_brief = CFCDocuComment_get_brief(docucom);
-        if (raw_brief && raw_brief[0] != '\0') {
-            char *brief = S_man_escape_content(raw_brief);
-            result = CFCUtil_cat(result, " \\- ", brief, NULL);
-            FREEMEM(brief);
-        }
+        raw_brief = CFCDocuComment_get_brief(docucom);
+    }
+    if (raw_brief && raw_brief[0] != '\0') {
+        char *brief = S_md_to_man(raw_brief, false);
+        result = CFCUtil_cat(result, " \\- ", brief, NULL);
+        FREEMEM(brief);
+    }
+    else {
+        result = CFCUtil_cat(result, "\n", NULL);
     }
-
-    result = CFCUtil_cat(result, "\n", NULL);
 
     return result;
 }
@@ -156,8 +157,8 @@ S_man_create_description(CFCClass *klass) {
     const char *raw_description = CFCDocuComment_get_long(docucom);
     if (!raw_description || raw_description[0] == '\0') { return result; }
 
-    char *description = S_man_escape_content(raw_description);
-    result = CFCUtil_cat(result, ".SH DESCRIPTION\n", description, "\n", NULL);
+    char *description = S_md_to_man(raw_description, false);
+    result = CFCUtil_cat(result, ".SH DESCRIPTION\n", description, NULL);
     FREEMEM(description);
 
     return result;
@@ -298,11 +299,12 @@ S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
     const char *pattern =
         ".TP\n"
         ".B %s\n"
-        ".na\n"
+        ".nf\n"
+        ".fam C\n"
         "%s%s\n"
-        ".br\n"
         "%s"
-        ".ad\n";
+        ".fam\n"
+        ".fi\n";
     char *result = CFCUtil_sprintf(pattern, short_sym, return_type_c,
                                    incremented, param_list);
 
@@ -325,8 +327,8 @@ S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
     if (docucomment) {
         // Description
         const char *raw_desc = CFCDocuComment_get_description(docucomment);
-        char *desc = S_man_escape_content(raw_desc);
-        result = CFCUtil_cat(result, ".IP\n", desc, "\n", NULL);
+        char *desc = S_md_to_man(raw_desc, true);
+        result = CFCUtil_cat(result, ".IP\n", desc, NULL);
         FREEMEM(desc);
 
         // Params
@@ -337,9 +339,9 @@ S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
         if (param_names[0]) {
             result = CFCUtil_cat(result, ".RS\n", NULL);
             for (size_t i = 0; param_names[i] != NULL; i++) {
-                char *doc = S_man_escape_content(param_docs[i]);
+                char *doc = S_md_to_man(param_docs[i], true);
                 result = CFCUtil_cat(result, ".TP\n.I ", param_names[i],
-                                     "\n", doc, "\n", NULL);
+                                     "\n", doc, NULL);
                 FREEMEM(doc);
             }
             result = CFCUtil_cat(result, ".RE\n", NULL);
@@ -348,9 +350,8 @@ S_man_create_func(CFCClass *klass, CFCFunction *func, const char *short_sym,
         // Return value
         const char *retval_doc = CFCDocuComment_get_retval(docucomment);
         if (retval_doc && strlen(retval_doc)) {
-            char *doc = S_man_escape_content(retval_doc);
-            result = CFCUtil_cat(result, ".IP\n.B Returns:\n", doc, "\n",
-                                 NULL);
+            char *doc = S_md_to_man(retval_doc, true);
+            result = CFCUtil_cat(result, ".IP\n.B Returns:\n", doc, NULL);
             FREEMEM(doc);
         }
     }
@@ -375,7 +376,7 @@ S_man_create_param_list(CFCFunction *func, const char *full_sym) {
         const char  *type_c   = CFCType_to_c(type);
         const char  *name     = CFCVariable_micro_sym(variable);
 
-        result = CFCUtil_cat(result, "\n.br\n.RB \"    ", type_c, " \" ", name,
+        result = CFCUtil_cat(result, "\n.RB \"    ", type_c, " \" ", name,
                              NULL);
 
         if (variables[i+1] || CFCType_decremented(type)) {
@@ -390,7 +391,7 @@ S_man_create_param_list(CFCFunction *func, const char *full_sym) {
         }
     }
 
-    result = CFCUtil_cat(result, "\n.br\n);\n.br\n", NULL);
+    result = CFCUtil_cat(result, "\n);\n", NULL);
 
     return result;
 }
@@ -415,12 +416,232 @@ S_man_create_inheritance(CFCClass *klass) {
 }
 
 static char*
-S_man_escape_content(const char *content) {
+S_md_to_man(const char *md, int needs_indent) {
+    cmark_node *doc = cmark_parse_document(md, strlen(md));
+    char *result = S_nodes_to_man(doc, needs_indent);
+    cmark_node_destroy(doc);
+
+    return result;
+}
+
+static char*
+S_nodes_to_man(cmark_node *node, int needs_indent) {
+    char *result = CFCUtil_strdup("");
+    int has_indent = needs_indent;
+    int has_vspace = true;
+
+    while (node) {
+        cmark_node_type type = cmark_node_get_type(node);
+
+        switch (type) {
+            case NODE_DOCUMENT: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, children_man, NULL);
+                FREEMEM(children_man);
+                break;
+            }
+
+            case NODE_PARAGRAPH: {
+                if (needs_indent && !has_indent) {
+                    result = CFCUtil_cat(result, ".IP\n", NULL);
+                    has_indent = true;
+                }
+                else if (!needs_indent && has_indent) {
+                    result = CFCUtil_cat(result, ".P\n", NULL);
+                    has_indent = false;
+                }
+                else if (!has_vspace) {
+                    result = CFCUtil_cat(result, "\n", NULL);
+                }
+
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, children_man, "\n", NULL);
+                FREEMEM(children_man);
+
+                has_vspace = false;
+
+                break;
+            }
+
+            case NODE_BLOCK_QUOTE: {
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RS\n", NULL);
+                }
+
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, true);
+                result = CFCUtil_cat(result, ".IP\n", children_man, NULL);
+                FREEMEM(children_man);
+
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RE\n", NULL);
+                    has_indent = false;
+                }
+                else {
+                    has_indent = true;
+                }
+
+                break;
+            }
+
+            case NODE_LIST_ITEM: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, true);
+                result = CFCUtil_cat(result, ".IP \\(bu\n", children_man,
+                                     NULL);
+                FREEMEM(children_man);
+                break;
+            }
+
+            case NODE_LIST: {
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RS\n", NULL);
+                }
+
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, children_man, NULL);
+                FREEMEM(children_man);
+
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RE\n", NULL);
+                    has_indent = false;
+                }
+                else {
+                    has_indent = true;
+                }
+
+                break;
+            }
+
+            case NODE_ATX_HEADER:
+            case NODE_SETEXT_HEADER: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, ".SS\n", children_man, "\n", NULL);
+                FREEMEM(children_man);
+                has_indent = false;
+                has_vspace = true;
+                break;
+            }
+
+            case NODE_INDENTED_CODE:
+            case NODE_FENCED_CODE: {
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RS\n", NULL);
+                }
+
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_man_escape(content);
+                result = CFCUtil_cat(result, ".IP\n.nf\n.fam C\n", escaped,
+                                     ".fam\n.fi\n", NULL);
+                FREEMEM(escaped);
+
+                if (needs_indent) {
+                    result = CFCUtil_cat(result, ".RE\n", NULL);
+                    has_indent = false;
+                }
+                else {
+                    has_indent = true;
+                }
+
+                break;
+            }
+
+            case NODE_HTML:
+                CFCUtil_warn("HTML not supported in man pages");
+                break;
+
+            case NODE_HRULE:
+                break;
+
+            case NODE_REFERENCE_DEF:
+                break;
+
+            case NODE_STRING: {
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_man_escape(content);
+                result = CFCUtil_cat(result, escaped, NULL);
+                FREEMEM(escaped);
+                break;
+            }
+
+            case NODE_LINEBREAK:
+                result = CFCUtil_cat(result, "\n.br\n", NULL);
+                break;
+
+            case NODE_SOFTBREAK:
+                result = CFCUtil_cat(result, "\n", NULL);
+                break;
+
+            case NODE_INLINE_CODE: {
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_man_escape(content);
+                result = CFCUtil_cat(result, "\\FC", escaped, "\\F[]", NULL);
+                FREEMEM(escaped);
+                break;
+            }
+
+            case NODE_INLINE_HTML: {
+                const char *html = cmark_node_get_string_content(node);
+                CFCUtil_warn("HTML not supported in man pages: %s", html);
+                break;
+            }
+
+            case NODE_LINK: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                const char *url = cmark_node_get_url(node);
+                result = CFCUtil_cat(result, "\n.UR ", url, "\n",
+                                     children_man, "\n.UE\n",
+                                     NULL);
+                FREEMEM(children_man);
+                break;
+            }
+
+            case NODE_IMAGE:
+                CFCUtil_warn("Images not supported in man pages");
+                break;
+
+            case NODE_STRONG: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, "\\fB", children_man, "\\f[]",
+                                     NULL);
+                FREEMEM(children_man);
+                break;
+            }
+
+            case NODE_EMPH: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_man = S_nodes_to_man(child, needs_indent);
+                result = CFCUtil_cat(result, "\\fI", children_man, "\\f[]",
+                                     NULL);
+                FREEMEM(children_man);
+                break;
+            }
+
+            default:
+                CFCUtil_die("Invalid cmark node type: %d", type);
+                break;
+        }
+
+        node = cmark_node_next(node);
+    }
+
+    return result;
+}
+
+static char*
+S_man_escape(const char *content) {
+    size_t  len        = strlen(content);
     size_t  result_len = 0;
-    size_t  result_cap = strlen(content) + 256;
+    size_t  result_cap = len + 256;
     char   *result     = (char*)MALLOCATE(result_cap + 1);
 
-    for (size_t i = 0; content[i]; i++) {
+    for (size_t i = 0; i < len; i++) {
         const char *subst      = content + i;
         size_t      subst_size = 1;
 
@@ -435,36 +656,18 @@ S_man_escape_content(const char *content) {
                 subst      = "\\-";
                 subst_size = 2;
                 break;
-            case '\n':
-                // Escape dot after newline.
-                if (content[i+1] == '.') {
-                    subst      = "\n\\";
-                    subst_size = 2;
-                }
-                break;
-            case '<':
-                // <code> markup.
-                if (strncmp(content + i + 1, "code>", 5) == 0) {
-                    subst      = "\\fI";
+            case '.':
+                // Escape dot at start of line.
+                if (i == 0 || content[i-1] == '\n') {
+                    subst      = "\\&.";
                     subst_size = 3;
-                    i += 5;
-                }
-                else if (strncmp(content + i + 1, "/code>", 6) == 0) {
-                    subst      = "\\fP";
-                    subst_size = 3;
-                    i += 6;
                 }
                 break;
-            case 'L':
-                if (content[i+1] == '<') {
-                    // POD-style link.
-                    struct CFCPodLink pod_link;
-                    S_parse_pod_link(content + i + 2, &pod_link);
-                    if (pod_link.total_size) {
-                        subst      = pod_link.text;
-                        subst_size = pod_link.text_size;
-                        i += pod_link.total_size + 1;
-                    }
+            case '\'':
+                // Escape single quote at start of line.
+                if (i == 0 || content[i-1] == '\n') {
+                    subst      = "\\&'";
+                    subst_size = 3;
                 }
                 break;
             default:
@@ -485,32 +688,3 @@ S_man_escape_content(const char *content) {
     return result;
 }
 
-// Quick and dirty parsing of POD links. The syntax isn't fully supported
-// and the result isn't man-escaped. But it should be good enough for now
-// since at some point we'll switch to another format anyway.
-static void
-S_parse_pod_link(const char *content, CFCPodLink *pod_link) {
-    int in_text = true;
-
-    for (size_t i = 0; i < 256 && content[i]; ++i) {
-        if (content[i] == '|') {
-            if (in_text) {
-                pod_link->text_size = i;
-                in_text = false;
-            }
-        }
-        else if (content[i] == '>') {
-            pod_link->total_size = i + 1;
-            pod_link->text       = content;
-            if (in_text) {
-                pod_link->text_size = i;
-            }
-            return;
-        }
-    }
-
-    pod_link->total_size = 0;
-    pod_link->text       = NULL;
-    pod_link->text_size  = 0;
-}
-


[14/16] lucy-clownfish git commit: Convert markup to Markdown

Posted by nw...@apache.org.
Convert <code> markup to Markdown


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/52eed70d
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/52eed70d
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/52eed70d

Branch: refs/heads/markdown
Commit: 52eed70dba006da87a3e5c4ff26add5cbb09c74b
Parents: fca91dc
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Nov 10 00:35:06 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 18:35:49 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCBindCore.h                      |  2 +-
 compiler/src/CFCMethod.h                        |  2 +-
 compiler/src/CFCParcel.h                        |  2 +-
 compiler/src/CFCPerlPod.c                       |  2 +-
 compiler/src/CFCPerlPod.h                       |  2 +-
 compiler/src/CFCSymbol.h                        |  6 +--
 compiler/src/CFCType.h                          | 10 ++--
 compiler/src/CFCUtil.h                          |  4 +-
 compiler/src/CFCVariable.h                      |  2 +-
 runtime/core/Clownfish/ByteBuf.cfh              |  4 +-
 runtime/core/Clownfish/CharBuf.cfh              | 10 ++--
 runtime/core/Clownfish/Err.cfh                  | 12 ++---
 runtime/core/Clownfish/Hash.cfh                 |  8 ++--
 runtime/core/Clownfish/Obj.cfh                  | 16 +++----
 runtime/core/Clownfish/String.cfh               | 14 +++---
 .../core/Clownfish/TestHarness/TestUtils.cfh    | 12 ++---
 runtime/core/Clownfish/Util/Atomic.cfh          |  6 +--
 runtime/core/Clownfish/Util/NumberUtils.cfh     | 50 ++++++++++----------
 runtime/core/Clownfish/Util/SortUtils.cfh       |  2 +-
 runtime/core/Clownfish/Util/StringHelper.cfh    |  2 +-
 runtime/core/Clownfish/VArray.cfh               | 16 +++----
 runtime/perl/xs/XSBind.h                        |  4 +-
 22 files changed, 94 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCBindCore.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCBindCore.h b/compiler/src/CFCBindCore.h
index 33fdd82..f6389d7 100644
--- a/compiler/src/CFCBindCore.h
+++ b/compiler/src/CFCBindCore.h
@@ -50,7 +50,7 @@ CFCBindCore_init(CFCBindCore *self, struct CFCHierarchy *hierarchy,
 void
 CFCBindCore_destroy(CFCBindCore *self);
 
-/** Call <code>CFCHierarchy_propagate_modified</code>to establish which
+/** Call `CFCHierarchy_propagate_modified`to establish which
  * classes do not have up-to-date generated .c and .h files, then traverse the
  * hierarchy writing all necessary files.
  */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCMethod.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCMethod.h b/compiler/src/CFCMethod.h
index f6beb94..9baea2b 100644
--- a/compiler/src/CFCMethod.h
+++ b/compiler/src/CFCMethod.h
@@ -185,7 +185,7 @@ CFCMethod_abstract(CFCMethod *self);
 int
 CFCMethod_novel(CFCMethod *self);
 
-/** Return the Clownfish::CFC::Model::Type for <code>self</code>.
+/** Return the Clownfish::CFC::Model::Type for `self`.
  */
 
 struct CFCType*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCParcel.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCParcel.h b/compiler/src/CFCParcel.h
index 9bd37be..dff7deb 100644
--- a/compiler/src/CFCParcel.h
+++ b/compiler/src/CFCParcel.h
@@ -41,7 +41,7 @@ typedef struct CFCPrereq CFCPrereq;
 struct CFCFileSpec;
 struct CFCVersion;
 
-/** Return the parcel which has been registered for <code>name</code>.
+/** Return the parcel which has been registered for `name`.
  */
 CFCParcel*
 CFCParcel_fetch(const char *name);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index 78c804f..b864fcb 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/compiler/src/CFCPerlPod.c
@@ -348,7 +348,7 @@ char*
 CFCPerlPod_perlify_doc_text(CFCPerlPod *self, const char *source) {
     (void)self; // unused
 
-    // Change <code>foo</code> to C<< foo >>.
+    // Change `foo` to C<< foo >>.
     char *copy = CFCUtil_strdup(source);
     char *orig = copy;
     copy = S_global_replace(orig, "<code>", "C<< ");

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCPerlPod.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.h b/compiler/src/CFCPerlPod.h
index 3fb94eb..38bb0c1 100644
--- a/compiler/src/CFCPerlPod.h
+++ b/compiler/src/CFCPerlPod.h
@@ -43,7 +43,7 @@ CFCPerlPod_destroy(CFCPerlPod *self);
  * Perl-space.
  * @param method The name of the method from the Clownfish class.  If not
  * supplied, an attempt will be made to locate the correct method using
- * <code>alias</code>.
+ * `alias`.
  * @param sample An optional Perl usage sample.
  * @param pod Optional verbatim POD, which will override all POD which would
  * otherwise have been generated.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCSymbol.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCSymbol.h b/compiler/src/CFCSymbol.h
index 2fecf48..98cdc83 100644
--- a/compiler/src/CFCSymbol.h
+++ b/compiler/src/CFCSymbol.h
@@ -135,17 +135,17 @@ CFCSymbol_short_sym(CFCSymbol *self);
 const char*
 CFCSymbol_full_sym(CFCSymbol *self);
 
-/** Get the Symbol's all-lowercase prefix, delegating to <code>parcel</code>.
+/** Get the Symbol's all-lowercase prefix, delegating to `parcel`.
  */
 const char*
 CFCSymbol_get_prefix(CFCSymbol *self);
 
-/** Get the Symbol's Titlecase prefix, delegating to <code>parcel</code>.
+/** Get the Symbol's Titlecase prefix, delegating to `parcel`.
  */
 const char*
 CFCSymbol_get_Prefix(CFCSymbol *self);
 
-/** Get the Symbol's all-uppercase prefix, delegating to <code>parcel</code>.
+/** Get the Symbol's all-uppercase prefix, delegating to `parcel`.
  */
 const char*
 CFCSymbol_get_PREFIX(CFCSymbol *self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCType.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCType.h b/compiler/src/CFCType.h
index dddab6a..f351eba 100644
--- a/compiler/src/CFCType.h
+++ b/compiler/src/CFCType.h
@@ -98,7 +98,7 @@ CFCType_new_float(int flags, const char *specifier);
 
 /** Create a Type representing an object.
  *
- * The supplied <code>specifier</code> must match the last component of the
+ * The supplied `specifier` must match the last component of the
  * class name -- i.e. for the class "Crustacean::Lobster" it must be
  * "Lobster".
  *
@@ -131,10 +131,10 @@ CFCType_new_composite(int flags, CFCType *child, int indirection,
 
 /** Return a Clownfish::CFC::Model::Type representing a the 'void' keyword in
  * C.  It can be used either for a void return type, or in conjuction with
- * with new_composite() to support the <code>void*</code> opaque pointer type.
+ * with new_composite() to support the `void*` opaque pointer type.
  *
  * @param is_const Should be true if the type is const.  (Useful in the
- * context of <code>const void*</code>).
+ * context of `const void*`).
  */
 CFCType*
 CFCType_new_void(int is_const);
@@ -148,7 +148,7 @@ CFCType_new_va_list(void);
  * with complex declaration syntaxes -- such as unions, structs, enums, or
  * function pointers -- from within Clownfish itself.
  *
- * The only constraint is that the <code>specifier</code> must end in "_t".
+ * The only constraint is that the `specifier` must end in "_t".
  * This allows us to create complex types in a C header file...
  *
  *    typedef union { float f; int i; } floatint_t;
@@ -158,7 +158,7 @@ CFCType_new_va_list(void);
  *
  *    floatint_t floatint;
  *
- * If <code>parcel</code> is supplied and <code>specifier</code> begins with a
+ * If `parcel` is supplied and `specifier` begins with a
  * capital letter, the Parcel's prefix will be prepended to the specifier:
  *
  *    foo_t         -> foo_t                # no prefix prepending

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCUtil.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCUtil.h b/compiler/src/CFCUtil.h
index 6540672..295006e 100644
--- a/compiler/src/CFCUtil.h
+++ b/compiler/src/CFCUtil.h
@@ -138,8 +138,8 @@ CFCUtil_current(const char *orig, const char *dest);
 void
 CFCUtil_write_file(const char *filename, const char *content, size_t len);
 
-/** Test whether there's a file at <code>path</code> which already matches
- * <code>content</code> exactly.  If something has changed, write the file.
+/** Test whether there's a file at `path` which already matches
+ * `content` exactly.  If something has changed, write the file.
  * Otherwise do nothing (and avoid bumping the file's modification time).
  *
  * @return true if the file was written, false otherwise.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/compiler/src/CFCVariable.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCVariable.h b/compiler/src/CFCVariable.h
index a7c0c23..671bf67 100644
--- a/compiler/src/CFCVariable.h
+++ b/compiler/src/CFCVariable.h
@@ -73,7 +73,7 @@ CFCVariable_inert(CFCVariable *self);
 
 
 /** Returns a string with the Variable's C type and its
- * <code>micro_sym</code>. For instance:
+ * `micro_sym`. For instance:
  *
  *     int32_t average_lifespan
  */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/ByteBuf.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/ByteBuf.cfh b/runtime/core/Clownfish/ByteBuf.cfh
index 065b1d7..01869e7 100644
--- a/runtime/core/Clownfish/ByteBuf.cfh
+++ b/runtime/core/Clownfish/ByteBuf.cfh
@@ -92,14 +92,14 @@ class Clownfish::ByteBuf nickname BB inherits Clownfish::Obj {
     void
     Cat_Bytes(ByteBuf *self, const void *bytes, size_t size);
 
-    /** Concatenate the contents of <code>other</code> onto the end of the
+    /** Concatenate the contents of `other` onto the end of the
      * original ByteBuf. Allocate more memory as needed.
      */
     void
     Cat(ByteBuf *self, ByteBuf *other);
 
     /** Assign more memory to the ByteBuf, if it doesn't already have enough
-     * room to hold <code>size</code> bytes.  Cannot shrink the allocation.
+     * room to hold `size` bytes.  Cannot shrink the allocation.
      *
      * @return a pointer to the raw buffer.
      */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/CharBuf.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/CharBuf.cfh b/runtime/core/Clownfish/CharBuf.cfh
index c3c3272..0b1657f 100644
--- a/runtime/core/Clownfish/CharBuf.cfh
+++ b/runtime/core/Clownfish/CharBuf.cfh
@@ -53,7 +53,7 @@ class Clownfish::CharBuf nickname CB
     /** Return a pointer to a new CharBuf which contains formatted data
      * expanded according to CB_VCatF.
      *
-     * Note: a user-supplied <code>pattern</code> string is a security hole
+     * Note: a user-supplied `pattern` string is a security hole
      * and must not be allowed.
      */
     inert incremented CharBuf*
@@ -76,7 +76,7 @@ class Clownfish::CharBuf nickname CB
     void
     Cat_Trusted_Utf8(CharBuf *self, const char *ptr, size_t size);
 
-    /** Concatenate the contents of <code>string</code> onto the end of the
+    /** Concatenate the contents of `string` onto the end of the
      * caller.
      */
     void
@@ -109,7 +109,7 @@ class Clownfish::CharBuf nickname CB
     Cat_Char(CharBuf *self, int32_t code_point);
 
     /** Assign more memory to the CharBuf, if it doesn't already have enough
-     * room to hold a string of <code>size</code> bytes.  Cannot shrink the
+     * room to hold a string of `size` bytes.  Cannot shrink the
      * allocation.
      *
      * @return a pointer to the raw buffer.
@@ -117,12 +117,12 @@ class Clownfish::CharBuf nickname CB
     char*
     Grow(CharBuf *self, size_t size);
 
-    /** Set the CharBuf's <code>size</code> attribute.
+    /** Set the CharBuf's `size` attribute.
      */
     void
     Set_Size(CharBuf *self, size_t size);
 
-    /** Get the CharBuf's <code>size</code> attribute.
+    /** Get the CharBuf's `size` attribute.
      */
     size_t
     Get_Size(CharBuf *self);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Err.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Err.cfh b/runtime/core/Clownfish/Err.cfh
index 155b649..60f6ecb 100644
--- a/runtime/core/Clownfish/Err.cfh
+++ b/runtime/core/Clownfish/Err.cfh
@@ -66,7 +66,7 @@ public class Clownfish::Err inherits Clownfish::Obj {
     public String*
     Get_Mess(Err *self);
 
-    /** Add information about the current stack frame onto <code>mess</code>.
+    /** Add information about the current stack frame onto `mess`.
      */
     void
     Add_Frame(Err *self, const char *file, int line, const char *func);
@@ -81,7 +81,7 @@ public class Clownfish::Err inherits Clownfish::Obj {
     public inert nullable Err*
     get_error();
 
-    /** Run <code>routine</code> within the host's exception handling
+    /** Run `routine` within the host's exception handling
      * environment, catching and returning any errors that occur.
      * 
      * If an unrecognized host exception is trapped, it will be wrapped in an
@@ -139,8 +139,8 @@ public class Clownfish::Err inherits Clownfish::Obj {
     make_mess(const char *file, int line, const char *func,
               const char *pattern, ...);
 
-    /** Verify that <code>obj</code> is either NULL or inherits from
-     * <code>klass</code>.
+    /** Verify that `obj` is either NULL or inherits from
+     * `klass`.
      *
      * @return the object.
      */
@@ -148,8 +148,8 @@ public class Clownfish::Err inherits Clownfish::Obj {
     downcast(Obj *obj, Class *klass, const char *file, int line,
                 const char *func);
 
-    /** Verify that <code>obj</code> is not NULL and inherits from
-     * <code>klass</code>.
+    /** Verify that `obj` is not NULL and inherits from
+     * `klass`.
      *
      * @return the object.
      */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Hash.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Hash.cfh b/runtime/core/Clownfish/Hash.cfh
index 6cd5ff1..abc3f38 100644
--- a/runtime/core/Clownfish/Hash.cfh
+++ b/runtime/core/Clownfish/Hash.cfh
@@ -53,7 +53,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
     void
     Clear(Hash *self);
 
-    /** Store a key-value pair.  If <code>key</code> is not already present,
+    /** Store a key-value pair.  If `key` is not already present,
      * Make_Key() will be called to manufacture the internally used key.
      */
     void
@@ -63,9 +63,9 @@ class Clownfish::Hash inherits Clownfish::Obj {
     Store_Utf8(Hash *self, const char *str, size_t len,
                decremented Obj *value);
 
-    /** Fetch the value associated with <code>key</code>.
+    /** Fetch the value associated with `key`.
      *
-     * @return the value, or NULL if <code>key</code> is not present.
+     * @return the value, or NULL if `key` is not present.
      */
     nullable Obj*
     Fetch(Hash *self, Obj *key);
@@ -75,7 +75,7 @@ class Clownfish::Hash inherits Clownfish::Obj {
 
     /** Attempt to delete a key-value pair from the hash.
      *
-     * @return the value if <code>key</code> exists and thus deletion
+     * @return the value if `key` exists and thus deletion
      * succeeds; otherwise NULL.
      */
     incremented nullable Obj*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Obj.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Obj.cfh b/runtime/core/Clownfish/Obj.cfh
index 91e981d..d3c9f59 100644
--- a/runtime/core/Clownfish/Obj.cfh
+++ b/runtime/core/Clownfish/Obj.cfh
@@ -42,7 +42,7 @@ public class Clownfish::Obj {
 
     /** NULL-safe invocation of Inc_RefCount().
      *
-     * @return NULL if <code>self</code> is NULL, otherwise the return value
+     * @return NULL if `self` is NULL, otherwise the return value
      * of Inc_RefCount().
      */
     inert inline incremented Obj*
@@ -57,7 +57,7 @@ public class Clownfish::Obj {
 
     /** NULL-safe invocation of Dec_RefCount().
      *
-     * @return NULL if <code>self</code> is NULL, otherwise the return value
+     * @return NULL if `self` is NULL, otherwise the return value
      * of Dec_RefCount().
      */
     inert inline uint32_t
@@ -79,8 +79,8 @@ public class Clownfish::Obj {
     public void
     Destroy(Obj *self);
 
-    /** Invoke the Destroy() method found in <code>klass</code> on
-     * <code>self</code>.
+    /** Invoke the Destroy() method found in `klass` on
+     * `self`.
      *
      * TODO: Eliminate this function if we can arrive at a proper SUPER syntax.
      */
@@ -100,8 +100,8 @@ public class Clownfish::Obj {
      *
      * @param other Another Obj.
      * @return 0 if the objects are equal, a negative number if
-     * <code>self</code> is less than <code>other</code>, and a positive
-     * number if <code>self</code> is greater than <code>other</code>.
+     * `self` is less than `other`, and a positive
+     * number if `self` is greater than `other`.
      */
     public abstract int32_t
     Compare_To(Obj *self, Obj *other);
@@ -121,7 +121,7 @@ public class Clownfish::Obj {
     public String*
     Get_Class_Name(Obj *self);
 
-    /** Indicate whether the object is a descendent of <code>ancestor</code>.
+    /** Indicate whether the object is a descendent of `ancestor`.
      */
     public bool
     Is_A(Obj *self, Class *ancestor);
@@ -148,7 +148,7 @@ public class Clownfish::Obj {
     To_Bool(Obj *self);
 
     /** Update the internal state of the object to mimic that of
-     * <code>other</code>.
+     * `other`.
      */
     public abstract void
     Mimic(Obj *self, Obj *other);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/String.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/String.cfh b/runtime/core/Clownfish/String.cfh
index 383f6b7..32f37a7 100644
--- a/runtime/core/Clownfish/String.cfh
+++ b/runtime/core/Clownfish/String.cfh
@@ -91,7 +91,7 @@ class Clownfish::String nickname Str
     /** Return a pointer to a new String which contains formatted data
      * expanded according to CB_VCatF.
      *
-     * Note: a user-supplied <code>pattern</code> string is a security hole
+     * Note: a user-supplied `pattern` string is a security hole
      * and must not be allowed.
      */
     inert incremented String*
@@ -104,13 +104,13 @@ class Clownfish::String nickname Str
     compare(const void *va, const void *vb);
 
     /** Perform lexical comparison of two Strings, with level of indirection
-     * set to please qsort and friends, and return true if <code>a</code> is
-     * less than <code>b</code>.
+     * set to please qsort and friends, and return true if `a` is
+     * less than `b`.
      */
     inert bool
     less_than(const void *va, const void *vb);
 
-    /** Return the concatenation of the String and <code>other</code>.
+    /** Return the concatenation of the String and `other`.
      */
     incremented String*
     Cat(String *self, String *other);
@@ -183,7 +183,7 @@ class Clownfish::String nickname Str
     size_t
     Length(String *self);
 
-    /** Get the String's <code>size</code> attribute.
+    /** Get the String's `size` attribute.
      */
     size_t
     Get_Size(String *self);
@@ -388,7 +388,7 @@ class Clownfish::StringIterator nickname StrIter
     Skip_Prev_Whitespace(StringIterator *self);
 
     /** Test whether the content after the iterator starts with
-     * <code>prefix</code>.
+     * `prefix`.
      */
     bool
     Starts_With(StringIterator *self, String *prefix);
@@ -400,7 +400,7 @@ class Clownfish::StringIterator nickname StrIter
     Starts_With_Utf8(StringIterator *self, const char *prefix, size_t size);
 
     /** Test whether the content before the iterator ends with
-     * <code>postfix</code>.
+     * `postfix`.
      */
     bool
     Ends_With(StringIterator *self, String *postfix);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/TestHarness/TestUtils.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestUtils.cfh b/runtime/core/Clownfish/TestHarness/TestUtils.cfh
index 90a9e36..4107189 100644
--- a/runtime/core/Clownfish/TestHarness/TestUtils.cfh
+++ b/runtime/core/Clownfish/TestHarness/TestUtils.cfh
@@ -28,28 +28,28 @@ inert class Clownfish::TestHarness::TestUtils  {
     inert uint64_t
     random_u64();
 
-    /** Return an array of <code>count</code> random 64-bit integers where
+    /** Return an array of `count` random 64-bit integers where
      * <code>min <= n < limit</code>.
      *
-     * If <code>buf</code> is NULL, it will be allocated, otherwise it will
+     * If `buf` is NULL, it will be allocated, otherwise it will
      * be used.
      */
     inert int64_t*
     random_i64s(int64_t *buf, size_t count, int64_t min, int64_t limit);
 
-    /** Return an array of <code>count</code> random unsigned, 64-bit integers
+    /** Return an array of `count` random unsigned, 64-bit integers
      * where <code>min <= n < limit</code>.
      *
-     * If <code>buf</code> is NULL, it will be allocated, otherwise it will
+     * If `buf` is NULL, it will be allocated, otherwise it will
      * be used.
      */
     inert uint64_t*
     random_u64s(uint64_t *buf, size_t count, uint64_t min, uint64_t limit);
 
-    /** Return an array of <code>count</code> random double-precision floating
+    /** Return an array of `count` random double-precision floating
      * point numbers between 0 and 1.
      *
-     * If <code>buf</code> is NULL, it will be allocated, otherwise it will
+     * If `buf` is NULL, it will be allocated, otherwise it will
      * be used.
      */
     inert double*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Util/Atomic.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/Atomic.cfh b/runtime/core/Clownfish/Util/Atomic.cfh
index fac9b40..7a950a7 100644
--- a/runtime/core/Clownfish/Util/Atomic.cfh
+++ b/runtime/core/Clownfish/Util/Atomic.cfh
@@ -22,9 +22,9 @@ inert class Clownfish::Util::Atomic { }
 
 __C__
 
-/** Compare and swap a pointer.  Test whether the value at <code>target</code>
- * matches <code>old_value</code>.  If it does, set <code>target</code> to
- * <code>new_value</code> and return true.  Otherwise, return false.
+/** Compare and swap a pointer.  Test whether the value at `target`
+ * matches `old_value`.  If it does, set `target` to
+ * `new_value` and return true.  Otherwise, return false.
  */
 static CFISH_INLINE bool
 cfish_Atomic_cas_ptr(void *volatile *target, void *old_value, void *new_value);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Util/NumberUtils.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/NumberUtils.cfh b/runtime/core/Clownfish/Util/NumberUtils.cfh
index 565359d..efab6cb 100644
--- a/runtime/core/Clownfish/Util/NumberUtils.cfh
+++ b/runtime/core/Clownfish/Util/NumberUtils.cfh
@@ -86,91 +86,91 @@ inert class Clownfish::Util::NumberUtils nickname NumUtil {
     inert inline double
     decode_bigend_f64(const void *source);
 
-    /** Encode a C32 at the space pointed to by <code>dest</code>. As a side
-     * effect, <code>dest</code> will be advanced to immediately after the end
+    /** Encode a C32 at the space pointed to by `dest`. As a side
+     * effect, `dest` will be advanced to immediately after the end
      * of the C32.
      */
     inert inline void
     encode_c32(uint32_t value, char **dest);
 
-    /** Encode a C32 at the space pointed to by <code>dest</code>, but add
+    /** Encode a C32 at the space pointed to by `dest`, but add
      * "leading zeroes" so that the space consumed will always be 5 bytes.  As
-     * a side effect, <code>dest</code> will be advanced to immediately after
+     * a side effect, `dest` will be advanced to immediately after
      * the end of the C32.
      */
     inert inline void
     encode_padded_c32(uint32_t value, char **dest);
 
-    /** Encode a C64 at the space pointed to by <code>dest</code>. As a side
-     * effect, <code>dest</code> will be advanced to immediately after the end
+    /** Encode a C64 at the space pointed to by `dest`. As a side
+     * effect, `dest` will be advanced to immediately after the end
      * of the C64.
      */
     inert inline void
     encode_c64(uint64_t value, char **dest);
 
-    /** Read a C32 from the buffer pointed to by <code>source</code>.  As a
+    /** Read a C32 from the buffer pointed to by `source`.  As a
      * side effect, advance the pointer, consuming the bytes occupied by the
      * C32.
      */
     inert inline uint32_t
     decode_c32(const char **source);
 
-    /** Read a C64 from the buffer pointed to by <code>source</code>.  As a
+    /** Read a C64 from the buffer pointed to by `source`.  As a
      * side effect, advance the pointer, consuming the bytes occupied by the
      * C64.
      */
     inert inline uint64_t
     decode_c64(const char **source);
 
-    /** Advance <code>source</code> past one encoded C32 or C64.
+    /** Advance `source` past one encoded C32 or C64.
      */
     inert inline void
     skip_cint(const char **source);
 
-    /** Interpret <code>array</code> as an array of bits; return true if the
-     * bit at <code>tick</code> is set, false otherwise.
+    /** Interpret `array` as an array of bits; return true if the
+     * bit at `tick` is set, false otherwise.
      */
     inert inline bool
     u1get(const void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of bits; set the bit at
-     * <code>tick</code>.
+    /** Interpret `array` as an array of bits; set the bit at
+     * `tick`.
      */
     inert inline void
     u1set(void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of bits; clear the bit at
-     * <code>tick</code>.
+    /** Interpret `array` as an array of bits; clear the bit at
+     * `tick`.
      */
     inert inline void
     u1clear(void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of bits; flip the bit at
-     * <code>tick</code>.
+    /** Interpret `array` as an array of bits; flip the bit at
+     * `tick`.
      */
     inert inline void
     u1flip(void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of two-bit integers; return
-     * the value at <code>tick</code>.
+    /** Interpret `array` as an array of two-bit integers; return
+     * the value at `tick`.
      */
     inert inline uint8_t
     u2get(const void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of two-bit integers; set the
-     * element at <code>tick</code> to <code>value</code>.
+    /** Interpret `array` as an array of two-bit integers; set the
+     * element at `tick` to `value`.
      */
     inert inline void
     u2set(void *array, uint32_t tick, uint8_t value);
 
-    /** Interpret <code>array</code> as an array of four-bit integers; return
-     * the value at <code>tick</code>.
+    /** Interpret `array` as an array of four-bit integers; return
+     * the value at `tick`.
      */
     inert inline uint8_t
     u4get(const void *array, uint32_t tick);
 
-    /** Interpret <code>array</code> as an array of four-bit integers; set the
-     * element at <code>tick</code> to <code>value</code>.
+    /** Interpret `array` as an array of four-bit integers; set the
+     * element at `tick` to `value`.
      */
     inert inline void
     u4set(void *array, uint32_t tick, uint8_t value);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Util/SortUtils.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/SortUtils.cfh b/runtime/core/Clownfish/Util/SortUtils.cfh
index f402f2d..8525ebe 100644
--- a/runtime/core/Clownfish/Util/SortUtils.cfh
+++ b/runtime/core/Clownfish/Util/SortUtils.cfh
@@ -41,7 +41,7 @@ inert class Clownfish::Util::SortUtils nickname Sort {
               CFISH_Sort_Compare_t compare, void *context);
 
     /** Merge two source arrays together using the classic mergesort merge
-     * algorithm, storing the result in <code>dest</code>.
+     * algorithm, storing the result in `dest`.
      *
      * Most merge functions operate on a single contiguous array and copy the
      * merged results results back into the source array before returning.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/Util/StringHelper.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Util/StringHelper.cfh b/runtime/core/Clownfish/Util/StringHelper.cfh
index 52f5816..6595bcc 100644
--- a/runtime/core/Clownfish/Util/StringHelper.cfh
+++ b/runtime/core/Clownfish/Util/StringHelper.cfh
@@ -29,7 +29,7 @@ inert class Clownfish::Util::StringHelper nickname StrHelp {
     overlap(const char *a, const char *b, size_t a_len,  size_t b_len);
 
     /** Encode a NULL-terminated string representation of a value in base 36
-     * into <code>buffer</code>.
+     * into `buffer`.
      *
      * @param value The number to be encoded.
      * @param buffer A buffer at least MAX_BASE36_BYTES bytes long.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/core/Clownfish/VArray.cfh
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/VArray.cfh b/runtime/core/Clownfish/VArray.cfh
index b5cb20a..69cc71e 100644
--- a/runtime/core/Clownfish/VArray.cfh
+++ b/runtime/core/Clownfish/VArray.cfh
@@ -70,7 +70,7 @@ class Clownfish::VArray nickname VA inherits Clownfish::Obj {
     incremented nullable Obj*
     Shift(VArray *self);
 
-    /** Ensure that the VArray has room for at least <code>capacity</code>
+    /** Ensure that the VArray has room for at least `capacity`
      * elements.
      */
     void
@@ -81,7 +81,7 @@ class Clownfish::VArray nickname VA inherits Clownfish::Obj {
     nullable Obj*
     Fetch(VArray *self, uint32_t tick);
 
-    /** Store an element at index <code>tick</code>, possibly displacing an
+    /** Store an element at index `tick`, possibly displacing an
      * existing element.
      */
     void
@@ -89,13 +89,13 @@ class Clownfish::VArray nickname VA inherits Clownfish::Obj {
 
     /** Replace an element in the VArray with NULL and return it.
      *
-     * @return whatever was stored at <code>tick</code>.
+     * @return whatever was stored at `tick`.
      */
     incremented nullable Obj*
     Delete(VArray *self, uint32_t tick);
 
-    /** Remove <code>length</code> elements from the array, starting at
-     * <code>offset</code>. Move elements over to fill in the gap.
+    /** Remove `length` elements from the array, starting at
+     * `offset`. Move elements over to fill in the gap.
      */
     void
     Excise(VArray *self, uint32_t offset, uint32_t length);
@@ -134,17 +134,17 @@ class Clownfish::VArray nickname VA inherits Clownfish::Obj {
     void
     Clear(VArray *self);
 
-    /** Accessor for <code>size</code> member.
+    /** Accessor for `size` member.
      */
     public uint32_t
     Get_Size(VArray *self);
 
-    /** Accessor for <code>capacity</code> member.
+    /** Accessor for `capacity` member.
      */
     uint32_t
     Get_Capacity(VArray *self);
 
-    /** Return all elements for which <code>test</code> returns true.
+    /** Return all elements for which `test` returns true.
      */
     public incremented VArray*
     Gather(VArray *self, CFISH_VA_Gather_Test_t test, void *data);

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/52eed70d/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/runtime/perl/xs/XSBind.h b/runtime/perl/xs/XSBind.h
index 22189f9..5259f80 100644
--- a/runtime/perl/xs/XSBind.h
+++ b/runtime/perl/xs/XSBind.h
@@ -60,9 +60,9 @@ cfish_XSBind_sv_defined(SV *sv) {
 
 /** If the SV contains a Clownfish object which passes an "isa" test against the
  * passed-in Class, return a pointer to it.  If not, but
- * <code>allocation</code> is non-NULL and a StackString would satisfy the
+ * `allocation` is non-NULL and a StackString would satisfy the
  * "isa" test, stringify the SV, create a StackString using
- * <code>allocation</code>, assign the SV's string to it, and return that
+ * `allocation`, assign the SV's string to it, and return that
  * instead.  If all else fails, throw an exception.
  */
 CFISH_VISIBLE cfish_Obj*


[10/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/html_unescape.gperf
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/html_unescape.gperf b/compiler/modules/CommonMark/src/html/html_unescape.gperf
new file mode 100644
index 0000000..4d46f67
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/html_unescape.gperf
@@ -0,0 +1,2131 @@
+struct html_ent {
+	const char *entity;
+	unsigned int utf8_len;
+	unsigned char utf8[4];
+};
+%%
+"Aacute", 2, {195, 129}
+"aacute", 2, {195, 161}
+"Abreve", 2, {196, 130}
+"abreve", 2, {196, 131}
+"ac", 3, {226, 136, 190}
+"acd", 3, {226, 136, 191}
+"acE", 3, {226, 136, 190}
+"Acirc", 2, {195, 130}
+"acirc", 2, {195, 162}
+"acute", 2, {194, 180}
+"Acy", 2, {208, 144}
+"acy", 2, {208, 176}
+"AElig", 2, {195, 134}
+"aelig", 2, {195, 166}
+"af", 3, {226, 129, 161}
+"Afr", 4, {240, 157, 148, 132}
+"afr", 4, {240, 157, 148, 158}
+"Agrave", 2, {195, 128}
+"agrave", 2, {195, 160}
+"alefsym", 3, {226, 132, 181}
+"aleph", 3, {226, 132, 181}
+"Alpha", 2, {206, 145}
+"alpha", 2, {206, 177}
+"Amacr", 2, {196, 128}
+"amacr", 2, {196, 129}
+"amalg", 3, {226, 168, 191}
+"amp", 1, {38}
+"AMP", 1, {38}
+"andand", 3, {226, 169, 149}
+"And", 3, {226, 169, 147}
+"and", 3, {226, 136, 167}
+"andd", 3, {226, 169, 156}
+"andslope", 3, {226, 169, 152}
+"andv", 3, {226, 169, 154}
+"ang", 3, {226, 136, 160}
+"ange", 3, {226, 166, 164}
+"angle", 3, {226, 136, 160}
+"angmsdaa", 3, {226, 166, 168}
+"angmsdab", 3, {226, 166, 169}
+"angmsdac", 3, {226, 166, 170}
+"angmsdad", 3, {226, 166, 171}
+"angmsdae", 3, {226, 166, 172}
+"angmsdaf", 3, {226, 166, 173}
+"angmsdag", 3, {226, 166, 174}
+"angmsdah", 3, {226, 166, 175}
+"angmsd", 3, {226, 136, 161}
+"angrt", 3, {226, 136, 159}
+"angrtvb", 3, {226, 138, 190}
+"angrtvbd", 3, {226, 166, 157}
+"angsph", 3, {226, 136, 162}
+"angst", 2, {195, 133}
+"angzarr", 3, {226, 141, 188}
+"Aogon", 2, {196, 132}
+"aogon", 2, {196, 133}
+"Aopf", 4, {240, 157, 148, 184}
+"aopf", 4, {240, 157, 149, 146}
+"apacir", 3, {226, 169, 175}
+"ap", 3, {226, 137, 136}
+"apE", 3, {226, 169, 176}
+"ape", 3, {226, 137, 138}
+"apid", 3, {226, 137, 139}
+"apos", 1, {39}
+"ApplyFunction", 3, {226, 129, 161}
+"approx", 3, {226, 137, 136}
+"approxeq", 3, {226, 137, 138}
+"Aring", 2, {195, 133}
+"aring", 2, {195, 165}
+"Ascr", 4, {240, 157, 146, 156}
+"ascr", 4, {240, 157, 146, 182}
+"Assign", 3, {226, 137, 148}
+"ast", 1, {42}
+"asymp", 3, {226, 137, 136}
+"asympeq", 3, {226, 137, 141}
+"Atilde", 2, {195, 131}
+"atilde", 2, {195, 163}
+"Auml", 2, {195, 132}
+"auml", 2, {195, 164}
+"awconint", 3, {226, 136, 179}
+"awint", 3, {226, 168, 145}
+"backcong", 3, {226, 137, 140}
+"backepsilon", 2, {207, 182}
+"backprime", 3, {226, 128, 181}
+"backsim", 3, {226, 136, 189}
+"backsimeq", 3, {226, 139, 141}
+"Backslash", 3, {226, 136, 150}
+"Barv", 3, {226, 171, 167}
+"barvee", 3, {226, 138, 189}
+"barwed", 3, {226, 140, 133}
+"Barwed", 3, {226, 140, 134}
+"barwedge", 3, {226, 140, 133}
+"bbrk", 3, {226, 142, 181}
+"bbrktbrk", 3, {226, 142, 182}
+"bcong", 3, {226, 137, 140}
+"Bcy", 2, {208, 145}
+"bcy", 2, {208, 177}
+"bdquo", 3, {226, 128, 158}
+"becaus", 3, {226, 136, 181}
+"because", 3, {226, 136, 181}
+"Because", 3, {226, 136, 181}
+"bemptyv", 3, {226, 166, 176}
+"bepsi", 2, {207, 182}
+"bernou", 3, {226, 132, 172}
+"Bernoullis", 3, {226, 132, 172}
+"Beta", 2, {206, 146}
+"beta", 2, {206, 178}
+"beth", 3, {226, 132, 182}
+"between", 3, {226, 137, 172}
+"Bfr", 4, {240, 157, 148, 133}
+"bfr", 4, {240, 157, 148, 159}
+"bigcap", 3, {226, 139, 130}
+"bigcirc", 3, {226, 151, 175}
+"bigcup", 3, {226, 139, 131}
+"bigodot", 3, {226, 168, 128}
+"bigoplus", 3, {226, 168, 129}
+"bigotimes", 3, {226, 168, 130}
+"bigsqcup", 3, {226, 168, 134}
+"bigstar", 3, {226, 152, 133}
+"bigtriangledown", 3, {226, 150, 189}
+"bigtriangleup", 3, {226, 150, 179}
+"biguplus", 3, {226, 168, 132}
+"bigvee", 3, {226, 139, 129}
+"bigwedge", 3, {226, 139, 128}
+"bkarow", 3, {226, 164, 141}
+"blacklozenge", 3, {226, 167, 171}
+"blacksquare", 3, {226, 150, 170}
+"blacktriangle", 3, {226, 150, 180}
+"blacktriangledown", 3, {226, 150, 190}
+"blacktriangleleft", 3, {226, 151, 130}
+"blacktriangleright", 3, {226, 150, 184}
+"blank", 3, {226, 144, 163}
+"blk12", 3, {226, 150, 146}
+"blk14", 3, {226, 150, 145}
+"blk34", 3, {226, 150, 147}
+"block", 3, {226, 150, 136}
+"bne", 1, {61}
+"bnequiv", 3, {226, 137, 161}
+"bNot", 3, {226, 171, 173}
+"bnot", 3, {226, 140, 144}
+"Bopf", 4, {240, 157, 148, 185}
+"bopf", 4, {240, 157, 149, 147}
+"bot", 3, {226, 138, 165}
+"bottom", 3, {226, 138, 165}
+"bowtie", 3, {226, 139, 136}
+"boxbox", 3, {226, 167, 137}
+"boxdl", 3, {226, 148, 144}
+"boxdL", 3, {226, 149, 149}
+"boxDl", 3, {226, 149, 150}
+"boxDL", 3, {226, 149, 151}
+"boxdr", 3, {226, 148, 140}
+"boxdR", 3, {226, 149, 146}
+"boxDr", 3, {226, 149, 147}
+"boxDR", 3, {226, 149, 148}
+"boxh", 3, {226, 148, 128}
+"boxH", 3, {226, 149, 144}
+"boxhd", 3, {226, 148, 172}
+"boxHd", 3, {226, 149, 164}
+"boxhD", 3, {226, 149, 165}
+"boxHD", 3, {226, 149, 166}
+"boxhu", 3, {226, 148, 180}
+"boxHu", 3, {226, 149, 167}
+"boxhU", 3, {226, 149, 168}
+"boxHU", 3, {226, 149, 169}
+"boxminus", 3, {226, 138, 159}
+"boxplus", 3, {226, 138, 158}
+"boxtimes", 3, {226, 138, 160}
+"boxul", 3, {226, 148, 152}
+"boxuL", 3, {226, 149, 155}
+"boxUl", 3, {226, 149, 156}
+"boxUL", 3, {226, 149, 157}
+"boxur", 3, {226, 148, 148}
+"boxuR", 3, {226, 149, 152}
+"boxUr", 3, {226, 149, 153}
+"boxUR", 3, {226, 149, 154}
+"boxv", 3, {226, 148, 130}
+"boxV", 3, {226, 149, 145}
+"boxvh", 3, {226, 148, 188}
+"boxvH", 3, {226, 149, 170}
+"boxVh", 3, {226, 149, 171}
+"boxVH", 3, {226, 149, 172}
+"boxvl", 3, {226, 148, 164}
+"boxvL", 3, {226, 149, 161}
+"boxVl", 3, {226, 149, 162}
+"boxVL", 3, {226, 149, 163}
+"boxvr", 3, {226, 148, 156}
+"boxvR", 3, {226, 149, 158}
+"boxVr", 3, {226, 149, 159}
+"boxVR", 3, {226, 149, 160}
+"bprime", 3, {226, 128, 181}
+"breve", 2, {203, 152}
+"Breve", 2, {203, 152}
+"brvbar", 2, {194, 166}
+"bscr", 4, {240, 157, 146, 183}
+"Bscr", 3, {226, 132, 172}
+"bsemi", 3, {226, 129, 143}
+"bsim", 3, {226, 136, 189}
+"bsime", 3, {226, 139, 141}
+"bsolb", 3, {226, 167, 133}
+"bsol", 1, {92}
+"bsolhsub", 3, {226, 159, 136}
+"bull", 3, {226, 128, 162}
+"bullet", 3, {226, 128, 162}
+"bump", 3, {226, 137, 142}
+"bumpE", 3, {226, 170, 174}
+"bumpe", 3, {226, 137, 143}
+"Bumpeq", 3, {226, 137, 142}
+"bumpeq", 3, {226, 137, 143}
+"Cacute", 2, {196, 134}
+"cacute", 2, {196, 135}
+"capand", 3, {226, 169, 132}
+"capbrcup", 3, {226, 169, 137}
+"capcap", 3, {226, 169, 139}
+"cap", 3, {226, 136, 169}
+"Cap", 3, {226, 139, 146}
+"capcup", 3, {226, 169, 135}
+"capdot", 3, {226, 169, 128}
+"CapitalDifferentialD", 3, {226, 133, 133}
+"caps", 3, {226, 136, 169}
+"caret", 3, {226, 129, 129}
+"caron", 2, {203, 135}
+"Cayleys", 3, {226, 132, 173}
+"ccaps", 3, {226, 169, 141}
+"Ccaron", 2, {196, 140}
+"ccaron", 2, {196, 141}
+"Ccedil", 2, {195, 135}
+"ccedil", 2, {195, 167}
+"Ccirc", 2, {196, 136}
+"ccirc", 2, {196, 137}
+"Cconint", 3, {226, 136, 176}
+"ccups", 3, {226, 169, 140}
+"ccupssm", 3, {226, 169, 144}
+"Cdot", 2, {196, 138}
+"cdot", 2, {196, 139}
+"cedil", 2, {194, 184}
+"Cedilla", 2, {194, 184}
+"cemptyv", 3, {226, 166, 178}
+"cent", 2, {194, 162}
+"centerdot", 2, {194, 183}
+"CenterDot", 2, {194, 183}
+"cfr", 4, {240, 157, 148, 160}
+"Cfr", 3, {226, 132, 173}
+"CHcy", 2, {208, 167}
+"chcy", 2, {209, 135}
+"check", 3, {226, 156, 147}
+"checkmark", 3, {226, 156, 147}
+"Chi", 2, {206, 167}
+"chi", 2, {207, 135}
+"circ", 2, {203, 134}
+"circeq", 3, {226, 137, 151}
+"circlearrowleft", 3, {226, 134, 186}
+"circlearrowright", 3, {226, 134, 187}
+"circledast", 3, {226, 138, 155}
+"circledcirc", 3, {226, 138, 154}
+"circleddash", 3, {226, 138, 157}
+"CircleDot", 3, {226, 138, 153}
+"circledR", 2, {194, 174}
+"circledS", 3, {226, 147, 136}
+"CircleMinus", 3, {226, 138, 150}
+"CirclePlus", 3, {226, 138, 149}
+"CircleTimes", 3, {226, 138, 151}
+"cir", 3, {226, 151, 139}
+"cirE", 3, {226, 167, 131}
+"cire", 3, {226, 137, 151}
+"cirfnint", 3, {226, 168, 144}
+"cirmid", 3, {226, 171, 175}
+"cirscir", 3, {226, 167, 130}
+"ClockwiseContourIntegral", 3, {226, 136, 178}
+"CloseCurlyDoubleQuote", 3, {226, 128, 157}
+"CloseCurlyQuote", 3, {226, 128, 153}
+"clubs", 3, {226, 153, 163}
+"clubsuit", 3, {226, 153, 163}
+"colon", 1, {58}
+"Colon", 3, {226, 136, 183}
+"Colone", 3, {226, 169, 180}
+"colone", 3, {226, 137, 148}
+"coloneq", 3, {226, 137, 148}
+"comma", 1, {44}
+"commat", 1, {64}
+"comp", 3, {226, 136, 129}
+"compfn", 3, {226, 136, 152}
+"complement", 3, {226, 136, 129}
+"complexes", 3, {226, 132, 130}
+"cong", 3, {226, 137, 133}
+"congdot", 3, {226, 169, 173}
+"Congruent", 3, {226, 137, 161}
+"conint", 3, {226, 136, 174}
+"Conint", 3, {226, 136, 175}
+"ContourIntegral", 3, {226, 136, 174}
+"copf", 4, {240, 157, 149, 148}
+"Copf", 3, {226, 132, 130}
+"coprod", 3, {226, 136, 144}
+"Coproduct", 3, {226, 136, 144}
+"copy", 2, {194, 169}
+"COPY", 2, {194, 169}
+"copysr", 3, {226, 132, 151}
+"CounterClockwiseContourIntegral", 3, {226, 136, 179}
+"crarr", 3, {226, 134, 181}
+"cross", 3, {226, 156, 151}
+"Cross", 3, {226, 168, 175}
+"Cscr", 4, {240, 157, 146, 158}
+"cscr", 4, {240, 157, 146, 184}
+"csub", 3, {226, 171, 143}
+"csube", 3, {226, 171, 145}
+"csup", 3, {226, 171, 144}
+"csupe", 3, {226, 171, 146}
+"ctdot", 3, {226, 139, 175}
+"cudarrl", 3, {226, 164, 184}
+"cudarrr", 3, {226, 164, 181}
+"cuepr", 3, {226, 139, 158}
+"cuesc", 3, {226, 139, 159}
+"cularr", 3, {226, 134, 182}
+"cularrp", 3, {226, 164, 189}
+"cupbrcap", 3, {226, 169, 136}
+"cupcap", 3, {226, 169, 134}
+"CupCap", 3, {226, 137, 141}
+"cup", 3, {226, 136, 170}
+"Cup", 3, {226, 139, 147}
+"cupcup", 3, {226, 169, 138}
+"cupdot", 3, {226, 138, 141}
+"cupor", 3, {226, 169, 133}
+"cups", 3, {226, 136, 170}
+"curarr", 3, {226, 134, 183}
+"curarrm", 3, {226, 164, 188}
+"curlyeqprec", 3, {226, 139, 158}
+"curlyeqsucc", 3, {226, 139, 159}
+"curlyvee", 3, {226, 139, 142}
+"curlywedge", 3, {226, 139, 143}
+"curren", 2, {194, 164}
+"curvearrowleft", 3, {226, 134, 182}
+"curvearrowright", 3, {226, 134, 183}
+"cuvee", 3, {226, 139, 142}
+"cuwed", 3, {226, 139, 143}
+"cwconint", 3, {226, 136, 178}
+"cwint", 3, {226, 136, 177}
+"cylcty", 3, {226, 140, 173}
+"dagger", 3, {226, 128, 160}
+"Dagger", 3, {226, 128, 161}
+"daleth", 3, {226, 132, 184}
+"darr", 3, {226, 134, 147}
+"Darr", 3, {226, 134, 161}
+"dArr", 3, {226, 135, 147}
+"dash", 3, {226, 128, 144}
+"Dashv", 3, {226, 171, 164}
+"dashv", 3, {226, 138, 163}
+"dbkarow", 3, {226, 164, 143}
+"dblac", 2, {203, 157}
+"Dcaron", 2, {196, 142}
+"dcaron", 2, {196, 143}
+"Dcy", 2, {208, 148}
+"dcy", 2, {208, 180}
+"ddagger", 3, {226, 128, 161}
+"ddarr", 3, {226, 135, 138}
+"DD", 3, {226, 133, 133}
+"dd", 3, {226, 133, 134}
+"DDotrahd", 3, {226, 164, 145}
+"ddotseq", 3, {226, 169, 183}
+"deg", 2, {194, 176}
+"Del", 3, {226, 136, 135}
+"Delta", 2, {206, 148}
+"delta", 2, {206, 180}
+"demptyv", 3, {226, 166, 177}
+"dfisht", 3, {226, 165, 191}
+"Dfr", 4, {240, 157, 148, 135}
+"dfr", 4, {240, 157, 148, 161}
+"dHar", 3, {226, 165, 165}
+"dharl", 3, {226, 135, 131}
+"dharr", 3, {226, 135, 130}
+"DiacriticalAcute", 2, {194, 180}
+"DiacriticalDot", 2, {203, 153}
+"DiacriticalDoubleAcute", 2, {203, 157}
+"DiacriticalGrave", 1, {96}
+"DiacriticalTilde", 2, {203, 156}
+"diam", 3, {226, 139, 132}
+"diamond", 3, {226, 139, 132}
+"Diamond", 3, {226, 139, 132}
+"diamondsuit", 3, {226, 153, 166}
+"diams", 3, {226, 153, 166}
+"die", 2, {194, 168}
+"DifferentialD", 3, {226, 133, 134}
+"digamma", 2, {207, 157}
+"disin", 3, {226, 139, 178}
+"div", 2, {195, 183}
+"divide", 2, {195, 183}
+"divideontimes", 3, {226, 139, 135}
+"divonx", 3, {226, 139, 135}
+"DJcy", 2, {208, 130}
+"djcy", 2, {209, 146}
+"dlcorn", 3, {226, 140, 158}
+"dlcrop", 3, {226, 140, 141}
+"dollar", 1, {36}
+"Dopf", 4, {240, 157, 148, 187}
+"dopf", 4, {240, 157, 149, 149}
+"Dot", 2, {194, 168}
+"dot", 2, {203, 153}
+"DotDot", 3, {226, 131, 156}
+"doteq", 3, {226, 137, 144}
+"doteqdot", 3, {226, 137, 145}
+"DotEqual", 3, {226, 137, 144}
+"dotminus", 3, {226, 136, 184}
+"dotplus", 3, {226, 136, 148}
+"dotsquare", 3, {226, 138, 161}
+"doublebarwedge", 3, {226, 140, 134}
+"DoubleContourIntegral", 3, {226, 136, 175}
+"DoubleDot", 2, {194, 168}
+"DoubleDownArrow", 3, {226, 135, 147}
+"DoubleLeftArrow", 3, {226, 135, 144}
+"DoubleLeftRightArrow", 3, {226, 135, 148}
+"DoubleLeftTee", 3, {226, 171, 164}
+"DoubleLongLeftArrow", 3, {226, 159, 184}
+"DoubleLongLeftRightArrow", 3, {226, 159, 186}
+"DoubleLongRightArrow", 3, {226, 159, 185}
+"DoubleRightArrow", 3, {226, 135, 146}
+"DoubleRightTee", 3, {226, 138, 168}
+"DoubleUpArrow", 3, {226, 135, 145}
+"DoubleUpDownArrow", 3, {226, 135, 149}
+"DoubleVerticalBar", 3, {226, 136, 165}
+"DownArrowBar", 3, {226, 164, 147}
+"downarrow", 3, {226, 134, 147}
+"DownArrow", 3, {226, 134, 147}
+"Downarrow", 3, {226, 135, 147}
+"DownArrowUpArrow", 3, {226, 135, 181}
+"DownBreve", 2, {204, 145}
+"downdownarrows", 3, {226, 135, 138}
+"downharpoonleft", 3, {226, 135, 131}
+"downharpoonright", 3, {226, 135, 130}
+"DownLeftRightVector", 3, {226, 165, 144}
+"DownLeftTeeVector", 3, {226, 165, 158}
+"DownLeftVectorBar", 3, {226, 165, 150}
+"DownLeftVector", 3, {226, 134, 189}
+"DownRightTeeVector", 3, {226, 165, 159}
+"DownRightVectorBar", 3, {226, 165, 151}
+"DownRightVector", 3, {226, 135, 129}
+"DownTeeArrow", 3, {226, 134, 167}
+"DownTee", 3, {226, 138, 164}
+"drbkarow", 3, {226, 164, 144}
+"drcorn", 3, {226, 140, 159}
+"drcrop", 3, {226, 140, 140}
+"Dscr", 4, {240, 157, 146, 159}
+"dscr", 4, {240, 157, 146, 185}
+"DScy", 2, {208, 133}
+"dscy", 2, {209, 149}
+"dsol", 3, {226, 167, 182}
+"Dstrok", 2, {196, 144}
+"dstrok", 2, {196, 145}
+"dtdot", 3, {226, 139, 177}
+"dtri", 3, {226, 150, 191}
+"dtrif", 3, {226, 150, 190}
+"duarr", 3, {226, 135, 181}
+"duhar", 3, {226, 165, 175}
+"dwangle", 3, {226, 166, 166}
+"DZcy", 2, {208, 143}
+"dzcy", 2, {209, 159}
+"dzigrarr", 3, {226, 159, 191}
+"Eacute", 2, {195, 137}
+"eacute", 2, {195, 169}
+"easter", 3, {226, 169, 174}
+"Ecaron", 2, {196, 154}
+"ecaron", 2, {196, 155}
+"Ecirc", 2, {195, 138}
+"ecirc", 2, {195, 170}
+"ecir", 3, {226, 137, 150}
+"ecolon", 3, {226, 137, 149}
+"Ecy", 2, {208, 173}
+"ecy", 2, {209, 141}
+"eDDot", 3, {226, 169, 183}
+"Edot", 2, {196, 150}
+"edot", 2, {196, 151}
+"eDot", 3, {226, 137, 145}
+"ee", 3, {226, 133, 135}
+"efDot", 3, {226, 137, 146}
+"Efr", 4, {240, 157, 148, 136}
+"efr", 4, {240, 157, 148, 162}
+"eg", 3, {226, 170, 154}
+"Egrave", 2, {195, 136}
+"egrave", 2, {195, 168}
+"egs", 3, {226, 170, 150}
+"egsdot", 3, {226, 170, 152}
+"el", 3, {226, 170, 153}
+"Element", 3, {226, 136, 136}
+"elinters", 3, {226, 143, 167}
+"ell", 3, {226, 132, 147}
+"els", 3, {226, 170, 149}
+"elsdot", 3, {226, 170, 151}
+"Emacr", 2, {196, 146}
+"emacr", 2, {196, 147}
+"empty", 3, {226, 136, 133}
+"emptyset", 3, {226, 136, 133}
+"EmptySmallSquare", 3, {226, 151, 187}
+"emptyv", 3, {226, 136, 133}
+"EmptyVerySmallSquare", 3, {226, 150, 171}
+"emsp13", 3, {226, 128, 132}
+"emsp14", 3, {226, 128, 133}
+"emsp", 3, {226, 128, 131}
+"ENG", 2, {197, 138}
+"eng", 2, {197, 139}
+"ensp", 3, {226, 128, 130}
+"Eogon", 2, {196, 152}
+"eogon", 2, {196, 153}
+"Eopf", 4, {240, 157, 148, 188}
+"eopf", 4, {240, 157, 149, 150}
+"epar", 3, {226, 139, 149}
+"eparsl", 3, {226, 167, 163}
+"eplus", 3, {226, 169, 177}
+"epsi", 2, {206, 181}
+"Epsilon", 2, {206, 149}
+"epsilon", 2, {206, 181}
+"epsiv", 2, {207, 181}
+"eqcirc", 3, {226, 137, 150}
+"eqcolon", 3, {226, 137, 149}
+"eqsim", 3, {226, 137, 130}
+"eqslantgtr", 3, {226, 170, 150}
+"eqslantless", 3, {226, 170, 149}
+"Equal", 3, {226, 169, 181}
+"equals", 1, {61}
+"EqualTilde", 3, {226, 137, 130}
+"equest", 3, {226, 137, 159}
+"Equilibrium", 3, {226, 135, 140}
+"equiv", 3, {226, 137, 161}
+"equivDD", 3, {226, 169, 184}
+"eqvparsl", 3, {226, 167, 165}
+"erarr", 3, {226, 165, 177}
+"erDot", 3, {226, 137, 147}
+"escr", 3, {226, 132, 175}
+"Escr", 3, {226, 132, 176}
+"esdot", 3, {226, 137, 144}
+"Esim", 3, {226, 169, 179}
+"esim", 3, {226, 137, 130}
+"Eta", 2, {206, 151}
+"eta", 2, {206, 183}
+"ETH", 2, {195, 144}
+"eth", 2, {195, 176}
+"Euml", 2, {195, 139}
+"euml", 2, {195, 171}
+"euro", 3, {226, 130, 172}
+"excl", 1, {33}
+"exist", 3, {226, 136, 131}
+"Exists", 3, {226, 136, 131}
+"expectation", 3, {226, 132, 176}
+"exponentiale", 3, {226, 133, 135}
+"ExponentialE", 3, {226, 133, 135}
+"fallingdotseq", 3, {226, 137, 146}
+"Fcy", 2, {208, 164}
+"fcy", 2, {209, 132}
+"female", 3, {226, 153, 128}
+"ffilig", 3, {239, 172, 131}
+"fflig", 3, {239, 172, 128}
+"ffllig", 3, {239, 172, 132}
+"Ffr", 4, {240, 157, 148, 137}
+"ffr", 4, {240, 157, 148, 163}
+"filig", 3, {239, 172, 129}
+"FilledSmallSquare", 3, {226, 151, 188}
+"FilledVerySmallSquare", 3, {226, 150, 170}
+"fjlig", 1, {102}
+"flat", 3, {226, 153, 173}
+"fllig", 3, {239, 172, 130}
+"fltns", 3, {226, 150, 177}
+"fnof", 2, {198, 146}
+"Fopf", 4, {240, 157, 148, 189}
+"fopf", 4, {240, 157, 149, 151}
+"forall", 3, {226, 136, 128}
+"ForAll", 3, {226, 136, 128}
+"fork", 3, {226, 139, 148}
+"forkv", 3, {226, 171, 153}
+"Fouriertrf", 3, {226, 132, 177}
+"fpartint", 3, {226, 168, 141}
+"frac12", 2, {194, 189}
+"frac13", 3, {226, 133, 147}
+"frac14", 2, {194, 188}
+"frac15", 3, {226, 133, 149}
+"frac16", 3, {226, 133, 153}
+"frac18", 3, {226, 133, 155}
+"frac23", 3, {226, 133, 148}
+"frac25", 3, {226, 133, 150}
+"frac34", 2, {194, 190}
+"frac35", 3, {226, 133, 151}
+"frac38", 3, {226, 133, 156}
+"frac45", 3, {226, 133, 152}
+"frac56", 3, {226, 133, 154}
+"frac58", 3, {226, 133, 157}
+"frac78", 3, {226, 133, 158}
+"frasl", 3, {226, 129, 132}
+"frown", 3, {226, 140, 162}
+"fscr", 4, {240, 157, 146, 187}
+"Fscr", 3, {226, 132, 177}
+"gacute", 2, {199, 181}
+"Gamma", 2, {206, 147}
+"gamma", 2, {206, 179}
+"Gammad", 2, {207, 156}
+"gammad", 2, {207, 157}
+"gap", 3, {226, 170, 134}
+"Gbreve", 2, {196, 158}
+"gbreve", 2, {196, 159}
+"Gcedil", 2, {196, 162}
+"Gcirc", 2, {196, 156}
+"gcirc", 2, {196, 157}
+"Gcy", 2, {208, 147}
+"gcy", 2, {208, 179}
+"Gdot", 2, {196, 160}
+"gdot", 2, {196, 161}
+"ge", 3, {226, 137, 165}
+"gE", 3, {226, 137, 167}
+"gEl", 3, {226, 170, 140}
+"gel", 3, {226, 139, 155}
+"geq", 3, {226, 137, 165}
+"geqq", 3, {226, 137, 167}
+"geqslant", 3, {226, 169, 190}
+"gescc", 3, {226, 170, 169}
+"ges", 3, {226, 169, 190}
+"gesdot", 3, {226, 170, 128}
+"gesdoto", 3, {226, 170, 130}
+"gesdotol", 3, {226, 170, 132}
+"gesl", 3, {226, 139, 155}
+"gesles", 3, {226, 170, 148}
+"Gfr", 4, {240, 157, 148, 138}
+"gfr", 4, {240, 157, 148, 164}
+"gg", 3, {226, 137, 171}
+"Gg", 3, {226, 139, 153}
+"ggg", 3, {226, 139, 153}
+"gimel", 3, {226, 132, 183}
+"GJcy", 2, {208, 131}
+"gjcy", 2, {209, 147}
+"gla", 3, {226, 170, 165}
+"gl", 3, {226, 137, 183}
+"glE", 3, {226, 170, 146}
+"glj", 3, {226, 170, 164}
+"gnap", 3, {226, 170, 138}
+"gnapprox", 3, {226, 170, 138}
+"gne", 3, {226, 170, 136}
+"gnE", 3, {226, 137, 169}
+"gneq", 3, {226, 170, 136}
+"gneqq", 3, {226, 137, 169}
+"gnsim", 3, {226, 139, 167}
+"Gopf", 4, {240, 157, 148, 190}
+"gopf", 4, {240, 157, 149, 152}
+"grave", 1, {96}
+"GreaterEqual", 3, {226, 137, 165}
+"GreaterEqualLess", 3, {226, 139, 155}
+"GreaterFullEqual", 3, {226, 137, 167}
+"GreaterGreater", 3, {226, 170, 162}
+"GreaterLess", 3, {226, 137, 183}
+"GreaterSlantEqual", 3, {226, 169, 190}
+"GreaterTilde", 3, {226, 137, 179}
+"Gscr", 4, {240, 157, 146, 162}
+"gscr", 3, {226, 132, 138}
+"gsim", 3, {226, 137, 179}
+"gsime", 3, {226, 170, 142}
+"gsiml", 3, {226, 170, 144}
+"gtcc", 3, {226, 170, 167}
+"gtcir", 3, {226, 169, 186}
+"gt", 1, {62}
+"GT", 1, {62}
+"Gt", 3, {226, 137, 171}
+"gtdot", 3, {226, 139, 151}
+"gtlPar", 3, {226, 166, 149}
+"gtquest", 3, {226, 169, 188}
+"gtrapprox", 3, {226, 170, 134}
+"gtrarr", 3, {226, 165, 184}
+"gtrdot", 3, {226, 139, 151}
+"gtreqless", 3, {226, 139, 155}
+"gtreqqless", 3, {226, 170, 140}
+"gtrless", 3, {226, 137, 183}
+"gtrsim", 3, {226, 137, 179}
+"gvertneqq", 3, {226, 137, 169}
+"gvnE", 3, {226, 137, 169}
+"Hacek", 2, {203, 135}
+"hairsp", 3, {226, 128, 138}
+"half", 2, {194, 189}
+"hamilt", 3, {226, 132, 139}
+"HARDcy", 2, {208, 170}
+"hardcy", 2, {209, 138}
+"harrcir", 3, {226, 165, 136}
+"harr", 3, {226, 134, 148}
+"hArr", 3, {226, 135, 148}
+"harrw", 3, {226, 134, 173}
+"Hat", 1, {94}
+"hbar", 3, {226, 132, 143}
+"Hcirc", 2, {196, 164}
+"hcirc", 2, {196, 165}
+"hearts", 3, {226, 153, 165}
+"heartsuit", 3, {226, 153, 165}
+"hellip", 3, {226, 128, 166}
+"hercon", 3, {226, 138, 185}
+"hfr", 4, {240, 157, 148, 165}
+"Hfr", 3, {226, 132, 140}
+"HilbertSpace", 3, {226, 132, 139}
+"hksearow", 3, {226, 164, 165}
+"hkswarow", 3, {226, 164, 166}
+"hoarr", 3, {226, 135, 191}
+"homtht", 3, {226, 136, 187}
+"hookleftarrow", 3, {226, 134, 169}
+"hookrightarrow", 3, {226, 134, 170}
+"hopf", 4, {240, 157, 149, 153}
+"Hopf", 3, {226, 132, 141}
+"horbar", 3, {226, 128, 149}
+"HorizontalLine", 3, {226, 148, 128}
+"hscr", 4, {240, 157, 146, 189}
+"Hscr", 3, {226, 132, 139}
+"hslash", 3, {226, 132, 143}
+"Hstrok", 2, {196, 166}
+"hstrok", 2, {196, 167}
+"HumpDownHump", 3, {226, 137, 142}
+"HumpEqual", 3, {226, 137, 143}
+"hybull", 3, {226, 129, 131}
+"hyphen", 3, {226, 128, 144}
+"Iacute", 2, {195, 141}
+"iacute", 2, {195, 173}
+"ic", 3, {226, 129, 163}
+"Icirc", 2, {195, 142}
+"icirc", 2, {195, 174}
+"Icy", 2, {208, 152}
+"icy", 2, {208, 184}
+"Idot", 2, {196, 176}
+"IEcy", 2, {208, 149}
+"iecy", 2, {208, 181}
+"iexcl", 2, {194, 161}
+"iff", 3, {226, 135, 148}
+"ifr", 4, {240, 157, 148, 166}
+"Ifr", 3, {226, 132, 145}
+"Igrave", 2, {195, 140}
+"igrave", 2, {195, 172}
+"ii", 3, {226, 133, 136}
+"iiiint", 3, {226, 168, 140}
+"iiint", 3, {226, 136, 173}
+"iinfin", 3, {226, 167, 156}
+"iiota", 3, {226, 132, 169}
+"IJlig", 2, {196, 178}
+"ijlig", 2, {196, 179}
+"Imacr", 2, {196, 170}
+"imacr", 2, {196, 171}
+"image", 3, {226, 132, 145}
+"ImaginaryI", 3, {226, 133, 136}
+"imagline", 3, {226, 132, 144}
+"imagpart", 3, {226, 132, 145}
+"imath", 2, {196, 177}
+"Im", 3, {226, 132, 145}
+"imof", 3, {226, 138, 183}
+"imped", 2, {198, 181}
+"Implies", 3, {226, 135, 146}
+"incare", 3, {226, 132, 133}
+"in", 3, {226, 136, 136}
+"infin", 3, {226, 136, 158}
+"infintie", 3, {226, 167, 157}
+"inodot", 2, {196, 177}
+"intcal", 3, {226, 138, 186}
+"int", 3, {226, 136, 171}
+"Int", 3, {226, 136, 172}
+"integers", 3, {226, 132, 164}
+"Integral", 3, {226, 136, 171}
+"intercal", 3, {226, 138, 186}
+"Intersection", 3, {226, 139, 130}
+"intlarhk", 3, {226, 168, 151}
+"intprod", 3, {226, 168, 188}
+"InvisibleComma", 3, {226, 129, 163}
+"InvisibleTimes", 3, {226, 129, 162}
+"IOcy", 2, {208, 129}
+"iocy", 2, {209, 145}
+"Iogon", 2, {196, 174}
+"iogon", 2, {196, 175}
+"Iopf", 4, {240, 157, 149, 128}
+"iopf", 4, {240, 157, 149, 154}
+"Iota", 2, {206, 153}
+"iota", 2, {206, 185}
+"iprod", 3, {226, 168, 188}
+"iquest", 2, {194, 191}
+"iscr", 4, {240, 157, 146, 190}
+"Iscr", 3, {226, 132, 144}
+"isin", 3, {226, 136, 136}
+"isindot", 3, {226, 139, 181}
+"isinE", 3, {226, 139, 185}
+"isins", 3, {226, 139, 180}
+"isinsv", 3, {226, 139, 179}
+"isinv", 3, {226, 136, 136}
+"it", 3, {226, 129, 162}
+"Itilde", 2, {196, 168}
+"itilde", 2, {196, 169}
+"Iukcy", 2, {208, 134}
+"iukcy", 2, {209, 150}
+"Iuml", 2, {195, 143}
+"iuml", 2, {195, 175}
+"Jcirc", 2, {196, 180}
+"jcirc", 2, {196, 181}
+"Jcy", 2, {208, 153}
+"jcy", 2, {208, 185}
+"Jfr", 4, {240, 157, 148, 141}
+"jfr", 4, {240, 157, 148, 167}
+"jmath", 2, {200, 183}
+"Jopf", 4, {240, 157, 149, 129}
+"jopf", 4, {240, 157, 149, 155}
+"Jscr", 4, {240, 157, 146, 165}
+"jscr", 4, {240, 157, 146, 191}
+"Jsercy", 2, {208, 136}
+"jsercy", 2, {209, 152}
+"Jukcy", 2, {208, 132}
+"jukcy", 2, {209, 148}
+"Kappa", 2, {206, 154}
+"kappa", 2, {206, 186}
+"kappav", 2, {207, 176}
+"Kcedil", 2, {196, 182}
+"kcedil", 2, {196, 183}
+"Kcy", 2, {208, 154}
+"kcy", 2, {208, 186}
+"Kfr", 4, {240, 157, 148, 142}
+"kfr", 4, {240, 157, 148, 168}
+"kgreen", 2, {196, 184}
+"KHcy", 2, {208, 165}
+"khcy", 2, {209, 133}
+"KJcy", 2, {208, 140}
+"kjcy", 2, {209, 156}
+"Kopf", 4, {240, 157, 149, 130}
+"kopf", 4, {240, 157, 149, 156}
+"Kscr", 4, {240, 157, 146, 166}
+"kscr", 4, {240, 157, 147, 128}
+"lAarr", 3, {226, 135, 154}
+"Lacute", 2, {196, 185}
+"lacute", 2, {196, 186}
+"laemptyv", 3, {226, 166, 180}
+"lagran", 3, {226, 132, 146}
+"Lambda", 2, {206, 155}
+"lambda", 2, {206, 187}
+"lang", 3, {226, 159, 168}
+"Lang", 3, {226, 159, 170}
+"langd", 3, {226, 166, 145}
+"langle", 3, {226, 159, 168}
+"lap", 3, {226, 170, 133}
+"Laplacetrf", 3, {226, 132, 146}
+"laquo", 2, {194, 171}
+"larrb", 3, {226, 135, 164}
+"larrbfs", 3, {226, 164, 159}
+"larr", 3, {226, 134, 144}
+"Larr", 3, {226, 134, 158}
+"lArr", 3, {226, 135, 144}
+"larrfs", 3, {226, 164, 157}
+"larrhk", 3, {226, 134, 169}
+"larrlp", 3, {226, 134, 171}
+"larrpl", 3, {226, 164, 185}
+"larrsim", 3, {226, 165, 179}
+"larrtl", 3, {226, 134, 162}
+"latail", 3, {226, 164, 153}
+"lAtail", 3, {226, 164, 155}
+"lat", 3, {226, 170, 171}
+"late", 3, {226, 170, 173}
+"lates", 3, {226, 170, 173}
+"lbarr", 3, {226, 164, 140}
+"lBarr", 3, {226, 164, 142}
+"lbbrk", 3, {226, 157, 178}
+"lbrace", 1, {123}
+"lbrack", 1, {91}
+"lbrke", 3, {226, 166, 139}
+"lbrksld", 3, {226, 166, 143}
+"lbrkslu", 3, {226, 166, 141}
+"Lcaron", 2, {196, 189}
+"lcaron", 2, {196, 190}
+"Lcedil", 2, {196, 187}
+"lcedil", 2, {196, 188}
+"lceil", 3, {226, 140, 136}
+"lcub", 1, {123}
+"Lcy", 2, {208, 155}
+"lcy", 2, {208, 187}
+"ldca", 3, {226, 164, 182}
+"ldquo", 3, {226, 128, 156}
+"ldquor", 3, {226, 128, 158}
+"ldrdhar", 3, {226, 165, 167}
+"ldrushar", 3, {226, 165, 139}
+"ldsh", 3, {226, 134, 178}
+"le", 3, {226, 137, 164}
+"lE", 3, {226, 137, 166}
+"LeftAngleBracket", 3, {226, 159, 168}
+"LeftArrowBar", 3, {226, 135, 164}
+"leftarrow", 3, {226, 134, 144}
+"LeftArrow", 3, {226, 134, 144}
+"Leftarrow", 3, {226, 135, 144}
+"LeftArrowRightArrow", 3, {226, 135, 134}
+"leftarrowtail", 3, {226, 134, 162}
+"LeftCeiling", 3, {226, 140, 136}
+"LeftDoubleBracket", 3, {226, 159, 166}
+"LeftDownTeeVector", 3, {226, 165, 161}
+"LeftDownVectorBar", 3, {226, 165, 153}
+"LeftDownVector", 3, {226, 135, 131}
+"LeftFloor", 3, {226, 140, 138}
+"leftharpoondown", 3, {226, 134, 189}
+"leftharpoonup", 3, {226, 134, 188}
+"leftleftarrows", 3, {226, 135, 135}
+"leftrightarrow", 3, {226, 134, 148}
+"LeftRightArrow", 3, {226, 134, 148}
+"Leftrightarrow", 3, {226, 135, 148}
+"leftrightarrows", 3, {226, 135, 134}
+"leftrightharpoons", 3, {226, 135, 139}
+"leftrightsquigarrow", 3, {226, 134, 173}
+"LeftRightVector", 3, {226, 165, 142}
+"LeftTeeArrow", 3, {226, 134, 164}
+"LeftTee", 3, {226, 138, 163}
+"LeftTeeVector", 3, {226, 165, 154}
+"leftthreetimes", 3, {226, 139, 139}
+"LeftTriangleBar", 3, {226, 167, 143}
+"LeftTriangle", 3, {226, 138, 178}
+"LeftTriangleEqual", 3, {226, 138, 180}
+"LeftUpDownVector", 3, {226, 165, 145}
+"LeftUpTeeVector", 3, {226, 165, 160}
+"LeftUpVectorBar", 3, {226, 165, 152}
+"LeftUpVector", 3, {226, 134, 191}
+"LeftVectorBar", 3, {226, 165, 146}
+"LeftVector", 3, {226, 134, 188}
+"lEg", 3, {226, 170, 139}
+"leg", 3, {226, 139, 154}
+"leq", 3, {226, 137, 164}
+"leqq", 3, {226, 137, 166}
+"leqslant", 3, {226, 169, 189}
+"lescc", 3, {226, 170, 168}
+"les", 3, {226, 169, 189}
+"lesdot", 3, {226, 169, 191}
+"lesdoto", 3, {226, 170, 129}
+"lesdotor", 3, {226, 170, 131}
+"lesg", 3, {226, 139, 154}
+"lesges", 3, {226, 170, 147}
+"lessapprox", 3, {226, 170, 133}
+"lessdot", 3, {226, 139, 150}
+"lesseqgtr", 3, {226, 139, 154}
+"lesseqqgtr", 3, {226, 170, 139}
+"LessEqualGreater", 3, {226, 139, 154}
+"LessFullEqual", 3, {226, 137, 166}
+"LessGreater", 3, {226, 137, 182}
+"lessgtr", 3, {226, 137, 182}
+"LessLess", 3, {226, 170, 161}
+"lesssim", 3, {226, 137, 178}
+"LessSlantEqual", 3, {226, 169, 189}
+"LessTilde", 3, {226, 137, 178}
+"lfisht", 3, {226, 165, 188}
+"lfloor", 3, {226, 140, 138}
+"Lfr", 4, {240, 157, 148, 143}
+"lfr", 4, {240, 157, 148, 169}
+"lg", 3, {226, 137, 182}
+"lgE", 3, {226, 170, 145}
+"lHar", 3, {226, 165, 162}
+"lhard", 3, {226, 134, 189}
+"lharu", 3, {226, 134, 188}
+"lharul", 3, {226, 165, 170}
+"lhblk", 3, {226, 150, 132}
+"LJcy", 2, {208, 137}
+"ljcy", 2, {209, 153}
+"llarr", 3, {226, 135, 135}
+"ll", 3, {226, 137, 170}
+"Ll", 3, {226, 139, 152}
+"llcorner", 3, {226, 140, 158}
+"Lleftarrow", 3, {226, 135, 154}
+"llhard", 3, {226, 165, 171}
+"lltri", 3, {226, 151, 186}
+"Lmidot", 2, {196, 191}
+"lmidot", 2, {197, 128}
+"lmoustache", 3, {226, 142, 176}
+"lmoust", 3, {226, 142, 176}
+"lnap", 3, {226, 170, 137}
+"lnapprox", 3, {226, 170, 137}
+"lne", 3, {226, 170, 135}
+"lnE", 3, {226, 137, 168}
+"lneq", 3, {226, 170, 135}
+"lneqq", 3, {226, 137, 168}
+"lnsim", 3, {226, 139, 166}
+"loang", 3, {226, 159, 172}
+"loarr", 3, {226, 135, 189}
+"lobrk", 3, {226, 159, 166}
+"longleftarrow", 3, {226, 159, 181}
+"LongLeftArrow", 3, {226, 159, 181}
+"Longleftarrow", 3, {226, 159, 184}
+"longleftrightarrow", 3, {226, 159, 183}
+"LongLeftRightArrow", 3, {226, 159, 183}
+"Longleftrightarrow", 3, {226, 159, 186}
+"longmapsto", 3, {226, 159, 188}
+"longrightarrow", 3, {226, 159, 182}
+"LongRightArrow", 3, {226, 159, 182}
+"Longrightarrow", 3, {226, 159, 185}
+"looparrowleft", 3, {226, 134, 171}
+"looparrowright", 3, {226, 134, 172}
+"lopar", 3, {226, 166, 133}
+"Lopf", 4, {240, 157, 149, 131}
+"lopf", 4, {240, 157, 149, 157}
+"loplus", 3, {226, 168, 173}
+"lotimes", 3, {226, 168, 180}
+"lowast", 3, {226, 136, 151}
+"lowbar", 1, {95}
+"LowerLeftArrow", 3, {226, 134, 153}
+"LowerRightArrow", 3, {226, 134, 152}
+"loz", 3, {226, 151, 138}
+"lozenge", 3, {226, 151, 138}
+"lozf", 3, {226, 167, 171}
+"lpar", 1, {40}
+"lparlt", 3, {226, 166, 147}
+"lrarr", 3, {226, 135, 134}
+"lrcorner", 3, {226, 140, 159}
+"lrhar", 3, {226, 135, 139}
+"lrhard", 3, {226, 165, 173}
+"lrm", 3, {226, 128, 142}
+"lrtri", 3, {226, 138, 191}
+"lsaquo", 3, {226, 128, 185}
+"lscr", 4, {240, 157, 147, 129}
+"Lscr", 3, {226, 132, 146}
+"lsh", 3, {226, 134, 176}
+"Lsh", 3, {226, 134, 176}
+"lsim", 3, {226, 137, 178}
+"lsime", 3, {226, 170, 141}
+"lsimg", 3, {226, 170, 143}
+"lsqb", 1, {91}
+"lsquo", 3, {226, 128, 152}
+"lsquor", 3, {226, 128, 154}
+"Lstrok", 2, {197, 129}
+"lstrok", 2, {197, 130}
+"ltcc", 3, {226, 170, 166}
+"ltcir", 3, {226, 169, 185}
+"lt", 1, {60}
+"LT", 1, {60}
+"Lt", 3, {226, 137, 170}
+"ltdot", 3, {226, 139, 150}
+"lthree", 3, {226, 139, 139}
+"ltimes", 3, {226, 139, 137}
+"ltlarr", 3, {226, 165, 182}
+"ltquest", 3, {226, 169, 187}
+"ltri", 3, {226, 151, 131}
+"ltrie", 3, {226, 138, 180}
+"ltrif", 3, {226, 151, 130}
+"ltrPar", 3, {226, 166, 150}
+"lurdshar", 3, {226, 165, 138}
+"luruhar", 3, {226, 165, 166}
+"lvertneqq", 3, {226, 137, 168}
+"lvnE", 3, {226, 137, 168}
+"macr", 2, {194, 175}
+"male", 3, {226, 153, 130}
+"malt", 3, {226, 156, 160}
+"maltese", 3, {226, 156, 160}
+"Map", 3, {226, 164, 133}
+"map", 3, {226, 134, 166}
+"mapsto", 3, {226, 134, 166}
+"mapstodown", 3, {226, 134, 167}
+"mapstoleft", 3, {226, 134, 164}
+"mapstoup", 3, {226, 134, 165}
+"marker", 3, {226, 150, 174}
+"mcomma", 3, {226, 168, 169}
+"Mcy", 2, {208, 156}
+"mcy", 2, {208, 188}
+"mdash", 3, {226, 128, 148}
+"mDDot", 3, {226, 136, 186}
+"measuredangle", 3, {226, 136, 161}
+"MediumSpace", 3, {226, 129, 159}
+"Mellintrf", 3, {226, 132, 179}
+"Mfr", 4, {240, 157, 148, 144}
+"mfr", 4, {240, 157, 148, 170}
+"mho", 3, {226, 132, 167}
+"micro", 2, {194, 181}
+"midast", 1, {42}
+"midcir", 3, {226, 171, 176}
+"mid", 3, {226, 136, 163}
+"middot", 2, {194, 183}
+"minusb", 3, {226, 138, 159}
+"minus", 3, {226, 136, 146}
+"minusd", 3, {226, 136, 184}
+"minusdu", 3, {226, 168, 170}
+"MinusPlus", 3, {226, 136, 147}
+"mlcp", 3, {226, 171, 155}
+"mldr", 3, {226, 128, 166}
+"mnplus", 3, {226, 136, 147}
+"models", 3, {226, 138, 167}
+"Mopf", 4, {240, 157, 149, 132}
+"mopf", 4, {240, 157, 149, 158}
+"mp", 3, {226, 136, 147}
+"mscr", 4, {240, 157, 147, 130}
+"Mscr", 3, {226, 132, 179}
+"mstpos", 3, {226, 136, 190}
+"Mu", 2, {206, 156}
+"mu", 2, {206, 188}
+"multimap", 3, {226, 138, 184}
+"mumap", 3, {226, 138, 184}
+"nabla", 3, {226, 136, 135}
+"Nacute", 2, {197, 131}
+"nacute", 2, {197, 132}
+"nang", 3, {226, 136, 160}
+"nap", 3, {226, 137, 137}
+"napE", 3, {226, 169, 176}
+"napid", 3, {226, 137, 139}
+"napos", 2, {197, 137}
+"napprox", 3, {226, 137, 137}
+"natural", 3, {226, 153, 174}
+"naturals", 3, {226, 132, 149}
+"natur", 3, {226, 153, 174}
+"nbsp", 2, {194, 160}
+"nbump", 3, {226, 137, 142}
+"nbumpe", 3, {226, 137, 143}
+"ncap", 3, {226, 169, 131}
+"Ncaron", 2, {197, 135}
+"ncaron", 2, {197, 136}
+"Ncedil", 2, {197, 133}
+"ncedil", 2, {197, 134}
+"ncong", 3, {226, 137, 135}
+"ncongdot", 3, {226, 169, 173}
+"ncup", 3, {226, 169, 130}
+"Ncy", 2, {208, 157}
+"ncy", 2, {208, 189}
+"ndash", 3, {226, 128, 147}
+"nearhk", 3, {226, 164, 164}
+"nearr", 3, {226, 134, 151}
+"neArr", 3, {226, 135, 151}
+"nearrow", 3, {226, 134, 151}
+"ne", 3, {226, 137, 160}
+"nedot", 3, {226, 137, 144}
+"NegativeMediumSpace", 3, {226, 128, 139}
+"NegativeThickSpace", 3, {226, 128, 139}
+"NegativeThinSpace", 3, {226, 128, 139}
+"NegativeVeryThinSpace", 3, {226, 128, 139}
+"nequiv", 3, {226, 137, 162}
+"nesear", 3, {226, 164, 168}
+"nesim", 3, {226, 137, 130}
+"NestedGreaterGreater", 3, {226, 137, 171}
+"NestedLessLess", 3, {226, 137, 170}
+"NewLine", 1, {10}
+"nexist", 3, {226, 136, 132}
+"nexists", 3, {226, 136, 132}
+"Nfr", 4, {240, 157, 148, 145}
+"nfr", 4, {240, 157, 148, 171}
+"ngE", 3, {226, 137, 167}
+"nge", 3, {226, 137, 177}
+"ngeq", 3, {226, 137, 177}
+"ngeqq", 3, {226, 137, 167}
+"ngeqslant", 3, {226, 169, 190}
+"nges", 3, {226, 169, 190}
+"nGg", 3, {226, 139, 153}
+"ngsim", 3, {226, 137, 181}
+"nGt", 3, {226, 137, 171}
+"ngt", 3, {226, 137, 175}
+"ngtr", 3, {226, 137, 175}
+"nGtv", 3, {226, 137, 171}
+"nharr", 3, {226, 134, 174}
+"nhArr", 3, {226, 135, 142}
+"nhpar", 3, {226, 171, 178}
+"ni", 3, {226, 136, 139}
+"nis", 3, {226, 139, 188}
+"nisd", 3, {226, 139, 186}
+"niv", 3, {226, 136, 139}
+"NJcy", 2, {208, 138}
+"njcy", 2, {209, 154}
+"nlarr", 3, {226, 134, 154}
+"nlArr", 3, {226, 135, 141}
+"nldr", 3, {226, 128, 165}
+"nlE", 3, {226, 137, 166}
+"nle", 3, {226, 137, 176}
+"nleftarrow", 3, {226, 134, 154}
+"nLeftarrow", 3, {226, 135, 141}
+"nleftrightarrow", 3, {226, 134, 174}
+"nLeftrightarrow", 3, {226, 135, 142}
+"nleq", 3, {226, 137, 176}
+"nleqq", 3, {226, 137, 166}
+"nleqslant", 3, {226, 169, 189}
+"nles", 3, {226, 169, 189}
+"nless", 3, {226, 137, 174}
+"nLl", 3, {226, 139, 152}
+"nlsim", 3, {226, 137, 180}
+"nLt", 3, {226, 137, 170}
+"nlt", 3, {226, 137, 174}
+"nltri", 3, {226, 139, 170}
+"nltrie", 3, {226, 139, 172}
+"nLtv", 3, {226, 137, 170}
+"nmid", 3, {226, 136, 164}
+"NoBreak", 3, {226, 129, 160}
+"NonBreakingSpace", 2, {194, 160}
+"nopf", 4, {240, 157, 149, 159}
+"Nopf", 3, {226, 132, 149}
+"Not", 3, {226, 171, 172}
+"not", 2, {194, 172}
+"NotCongruent", 3, {226, 137, 162}
+"NotCupCap", 3, {226, 137, 173}
+"NotDoubleVerticalBar", 3, {226, 136, 166}
+"NotElement", 3, {226, 136, 137}
+"NotEqual", 3, {226, 137, 160}
+"NotEqualTilde", 3, {226, 137, 130}
+"NotExists", 3, {226, 136, 132}
+"NotGreater", 3, {226, 137, 175}
+"NotGreaterEqual", 3, {226, 137, 177}
+"NotGreaterFullEqual", 3, {226, 137, 167}
+"NotGreaterGreater", 3, {226, 137, 171}
+"NotGreaterLess", 3, {226, 137, 185}
+"NotGreaterSlantEqual", 3, {226, 169, 190}
+"NotGreaterTilde", 3, {226, 137, 181}
+"NotHumpDownHump", 3, {226, 137, 142}
+"NotHumpEqual", 3, {226, 137, 143}
+"notin", 3, {226, 136, 137}
+"notindot", 3, {226, 139, 181}
+"notinE", 3, {226, 139, 185}
+"notinva", 3, {226, 136, 137}
+"notinvb", 3, {226, 139, 183}
+"notinvc", 3, {226, 139, 182}
+"NotLeftTriangleBar", 3, {226, 167, 143}
+"NotLeftTriangle", 3, {226, 139, 170}
+"NotLeftTriangleEqual", 3, {226, 139, 172}
+"NotLess", 3, {226, 137, 174}
+"NotLessEqual", 3, {226, 137, 176}
+"NotLessGreater", 3, {226, 137, 184}
+"NotLessLess", 3, {226, 137, 170}
+"NotLessSlantEqual", 3, {226, 169, 189}
+"NotLessTilde", 3, {226, 137, 180}
+"NotNestedGreaterGreater", 3, {226, 170, 162}
+"NotNestedLessLess", 3, {226, 170, 161}
+"notni", 3, {226, 136, 140}
+"notniva", 3, {226, 136, 140}
+"notnivb", 3, {226, 139, 190}
+"notnivc", 3, {226, 139, 189}
+"NotPrecedes", 3, {226, 138, 128}
+"NotPrecedesEqual", 3, {226, 170, 175}
+"NotPrecedesSlantEqual", 3, {226, 139, 160}
+"NotReverseElement", 3, {226, 136, 140}
+"NotRightTriangleBar", 3, {226, 167, 144}
+"NotRightTriangle", 3, {226, 139, 171}
+"NotRightTriangleEqual", 3, {226, 139, 173}
+"NotSquareSubset", 3, {226, 138, 143}
+"NotSquareSubsetEqual", 3, {226, 139, 162}
+"NotSquareSuperset", 3, {226, 138, 144}
+"NotSquareSupersetEqual", 3, {226, 139, 163}
+"NotSubset", 3, {226, 138, 130}
+"NotSubsetEqual", 3, {226, 138, 136}
+"NotSucceeds", 3, {226, 138, 129}
+"NotSucceedsEqual", 3, {226, 170, 176}
+"NotSucceedsSlantEqual", 3, {226, 139, 161}
+"NotSucceedsTilde", 3, {226, 137, 191}
+"NotSuperset", 3, {226, 138, 131}
+"NotSupersetEqual", 3, {226, 138, 137}
+"NotTilde", 3, {226, 137, 129}
+"NotTildeEqual", 3, {226, 137, 132}
+"NotTildeFullEqual", 3, {226, 137, 135}
+"NotTildeTilde", 3, {226, 137, 137}
+"NotVerticalBar", 3, {226, 136, 164}
+"nparallel", 3, {226, 136, 166}
+"npar", 3, {226, 136, 166}
+"nparsl", 3, {226, 171, 189}
+"npart", 3, {226, 136, 130}
+"npolint", 3, {226, 168, 148}
+"npr", 3, {226, 138, 128}
+"nprcue", 3, {226, 139, 160}
+"nprec", 3, {226, 138, 128}
+"npreceq", 3, {226, 170, 175}
+"npre", 3, {226, 170, 175}
+"nrarrc", 3, {226, 164, 179}
+"nrarr", 3, {226, 134, 155}
+"nrArr", 3, {226, 135, 143}
+"nrarrw", 3, {226, 134, 157}
+"nrightarrow", 3, {226, 134, 155}
+"nRightarrow", 3, {226, 135, 143}
+"nrtri", 3, {226, 139, 171}
+"nrtrie", 3, {226, 139, 173}
+"nsc", 3, {226, 138, 129}
+"nsccue", 3, {226, 139, 161}
+"nsce", 3, {226, 170, 176}
+"Nscr", 4, {240, 157, 146, 169}
+"nscr", 4, {240, 157, 147, 131}
+"nshortmid", 3, {226, 136, 164}
+"nshortparallel", 3, {226, 136, 166}
+"nsim", 3, {226, 137, 129}
+"nsime", 3, {226, 137, 132}
+"nsimeq", 3, {226, 137, 132}
+"nsmid", 3, {226, 136, 164}
+"nspar", 3, {226, 136, 166}
+"nsqsube", 3, {226, 139, 162}
+"nsqsupe", 3, {226, 139, 163}
+"nsub", 3, {226, 138, 132}
+"nsubE", 3, {226, 171, 133}
+"nsube", 3, {226, 138, 136}
+"nsubset", 3, {226, 138, 130}
+"nsubseteq", 3, {226, 138, 136}
+"nsubseteqq", 3, {226, 171, 133}
+"nsucc", 3, {226, 138, 129}
+"nsucceq", 3, {226, 170, 176}
+"nsup", 3, {226, 138, 133}
+"nsupE", 3, {226, 171, 134}
+"nsupe", 3, {226, 138, 137}
+"nsupset", 3, {226, 138, 131}
+"nsupseteq", 3, {226, 138, 137}
+"nsupseteqq", 3, {226, 171, 134}
+"ntgl", 3, {226, 137, 185}
+"Ntilde", 2, {195, 145}
+"ntilde", 2, {195, 177}
+"ntlg", 3, {226, 137, 184}
+"ntriangleleft", 3, {226, 139, 170}
+"ntrianglelefteq", 3, {226, 139, 172}
+"ntriangleright", 3, {226, 139, 171}
+"ntrianglerighteq", 3, {226, 139, 173}
+"Nu", 2, {206, 157}
+"nu", 2, {206, 189}
+"num", 1, {35}
+"numero", 3, {226, 132, 150}
+"numsp", 3, {226, 128, 135}
+"nvap", 3, {226, 137, 141}
+"nvdash", 3, {226, 138, 172}
+"nvDash", 3, {226, 138, 173}
+"nVdash", 3, {226, 138, 174}
+"nVDash", 3, {226, 138, 175}
+"nvge", 3, {226, 137, 165}
+"nvgt", 1, {62}
+"nvHarr", 3, {226, 164, 132}
+"nvinfin", 3, {226, 167, 158}
+"nvlArr", 3, {226, 164, 130}
+"nvle", 3, {226, 137, 164}
+"nvlt", 1, {60}
+"nvltrie", 3, {226, 138, 180}
+"nvrArr", 3, {226, 164, 131}
+"nvrtrie", 3, {226, 138, 181}
+"nvsim", 3, {226, 136, 188}
+"nwarhk", 3, {226, 164, 163}
+"nwarr", 3, {226, 134, 150}
+"nwArr", 3, {226, 135, 150}
+"nwarrow", 3, {226, 134, 150}
+"nwnear", 3, {226, 164, 167}
+"Oacute", 2, {195, 147}
+"oacute", 2, {195, 179}
+"oast", 3, {226, 138, 155}
+"Ocirc", 2, {195, 148}
+"ocirc", 2, {195, 180}
+"ocir", 3, {226, 138, 154}
+"Ocy", 2, {208, 158}
+"ocy", 2, {208, 190}
+"odash", 3, {226, 138, 157}
+"Odblac", 2, {197, 144}
+"odblac", 2, {197, 145}
+"odiv", 3, {226, 168, 184}
+"odot", 3, {226, 138, 153}
+"odsold", 3, {226, 166, 188}
+"OElig", 2, {197, 146}
+"oelig", 2, {197, 147}
+"ofcir", 3, {226, 166, 191}
+"Ofr", 4, {240, 157, 148, 146}
+"ofr", 4, {240, 157, 148, 172}
+"ogon", 2, {203, 155}
+"Ograve", 2, {195, 146}
+"ograve", 2, {195, 178}
+"ogt", 3, {226, 167, 129}
+"ohbar", 3, {226, 166, 181}
+"ohm", 2, {206, 169}
+"oint", 3, {226, 136, 174}
+"olarr", 3, {226, 134, 186}
+"olcir", 3, {226, 166, 190}
+"olcross", 3, {226, 166, 187}
+"oline", 3, {226, 128, 190}
+"olt", 3, {226, 167, 128}
+"Omacr", 2, {197, 140}
+"omacr", 2, {197, 141}
+"Omega", 2, {206, 169}
+"omega", 2, {207, 137}
+"Omicron", 2, {206, 159}
+"omicron", 2, {206, 191}
+"omid", 3, {226, 166, 182}
+"ominus", 3, {226, 138, 150}
+"Oopf", 4, {240, 157, 149, 134}
+"oopf", 4, {240, 157, 149, 160}
+"opar", 3, {226, 166, 183}
+"OpenCurlyDoubleQuote", 3, {226, 128, 156}
+"OpenCurlyQuote", 3, {226, 128, 152}
+"operp", 3, {226, 166, 185}
+"oplus", 3, {226, 138, 149}
+"orarr", 3, {226, 134, 187}
+"Or", 3, {226, 169, 148}
+"or", 3, {226, 136, 168}
+"ord", 3, {226, 169, 157}
+"order", 3, {226, 132, 180}
+"orderof", 3, {226, 132, 180}
+"ordf", 2, {194, 170}
+"ordm", 2, {194, 186}
+"origof", 3, {226, 138, 182}
+"oror", 3, {226, 169, 150}
+"orslope", 3, {226, 169, 151}
+"orv", 3, {226, 169, 155}
+"oS", 3, {226, 147, 136}
+"Oscr", 4, {240, 157, 146, 170}
+"oscr", 3, {226, 132, 180}
+"Oslash", 2, {195, 152}
+"oslash", 2, {195, 184}
+"osol", 3, {226, 138, 152}
+"Otilde", 2, {195, 149}
+"otilde", 2, {195, 181}
+"otimesas", 3, {226, 168, 182}
+"Otimes", 3, {226, 168, 183}
+"otimes", 3, {226, 138, 151}
+"Ouml", 2, {195, 150}
+"ouml", 2, {195, 182}
+"ovbar", 3, {226, 140, 189}
+"OverBar", 3, {226, 128, 190}
+"OverBrace", 3, {226, 143, 158}
+"OverBracket", 3, {226, 142, 180}
+"OverParenthesis", 3, {226, 143, 156}
+"para", 2, {194, 182}
+"parallel", 3, {226, 136, 165}
+"par", 3, {226, 136, 165}
+"parsim", 3, {226, 171, 179}
+"parsl", 3, {226, 171, 189}
+"part", 3, {226, 136, 130}
+"PartialD", 3, {226, 136, 130}
+"Pcy", 2, {208, 159}
+"pcy", 2, {208, 191}
+"percnt", 1, {37}
+"period", 1, {46}
+"permil", 3, {226, 128, 176}
+"perp", 3, {226, 138, 165}
+"pertenk", 3, {226, 128, 177}
+"Pfr", 4, {240, 157, 148, 147}
+"pfr", 4, {240, 157, 148, 173}
+"Phi", 2, {206, 166}
+"phi", 2, {207, 134}
+"phiv", 2, {207, 149}
+"phmmat", 3, {226, 132, 179}
+"phone", 3, {226, 152, 142}
+"Pi", 2, {206, 160}
+"pi", 2, {207, 128}
+"pitchfork", 3, {226, 139, 148}
+"piv", 2, {207, 150}
+"planck", 3, {226, 132, 143}
+"planckh", 3, {226, 132, 142}
+"plankv", 3, {226, 132, 143}
+"plusacir", 3, {226, 168, 163}
+"plusb", 3, {226, 138, 158}
+"pluscir", 3, {226, 168, 162}
+"plus", 1, {43}
+"plusdo", 3, {226, 136, 148}
+"plusdu", 3, {226, 168, 165}
+"pluse", 3, {226, 169, 178}
+"PlusMinus", 2, {194, 177}
+"plusmn", 2, {194, 177}
+"plussim", 3, {226, 168, 166}
+"plustwo", 3, {226, 168, 167}
+"pm", 2, {194, 177}
+"Poincareplane", 3, {226, 132, 140}
+"pointint", 3, {226, 168, 149}
+"popf", 4, {240, 157, 149, 161}
+"Popf", 3, {226, 132, 153}
+"pound", 2, {194, 163}
+"prap", 3, {226, 170, 183}
+"Pr", 3, {226, 170, 187}
+"pr", 3, {226, 137, 186}
+"prcue", 3, {226, 137, 188}
+"precapprox", 3, {226, 170, 183}
+"prec", 3, {226, 137, 186}
+"preccurlyeq", 3, {226, 137, 188}
+"Precedes", 3, {226, 137, 186}
+"PrecedesEqual", 3, {226, 170, 175}
+"PrecedesSlantEqual", 3, {226, 137, 188}
+"PrecedesTilde", 3, {226, 137, 190}
+"preceq", 3, {226, 170, 175}
+"precnapprox", 3, {226, 170, 185}
+"precneqq", 3, {226, 170, 181}
+"precnsim", 3, {226, 139, 168}
+"pre", 3, {226, 170, 175}
+"prE", 3, {226, 170, 179}
+"precsim", 3, {226, 137, 190}
+"prime", 3, {226, 128, 178}
+"Prime", 3, {226, 128, 179}
+"primes", 3, {226, 132, 153}
+"prnap", 3, {226, 170, 185}
+"prnE", 3, {226, 170, 181}
+"prnsim", 3, {226, 139, 168}
+"prod", 3, {226, 136, 143}
+"Product", 3, {226, 136, 143}
+"profalar", 3, {226, 140, 174}
+"profline", 3, {226, 140, 146}
+"profsurf", 3, {226, 140, 147}
+"prop", 3, {226, 136, 157}
+"Proportional", 3, {226, 136, 157}
+"Proportion", 3, {226, 136, 183}
+"propto", 3, {226, 136, 157}
+"prsim", 3, {226, 137, 190}
+"prurel", 3, {226, 138, 176}
+"Pscr", 4, {240, 157, 146, 171}
+"pscr", 4, {240, 157, 147, 133}
+"Psi", 2, {206, 168}
+"psi", 2, {207, 136}
+"puncsp", 3, {226, 128, 136}
+"Qfr", 4, {240, 157, 148, 148}
+"qfr", 4, {240, 157, 148, 174}
+"qint", 3, {226, 168, 140}
+"qopf", 4, {240, 157, 149, 162}
+"Qopf", 3, {226, 132, 154}
+"qprime", 3, {226, 129, 151}
+"Qscr", 4, {240, 157, 146, 172}
+"qscr", 4, {240, 157, 147, 134}
+"quaternions", 3, {226, 132, 141}
+"quatint", 3, {226, 168, 150}
+"quest", 1, {63}
+"questeq", 3, {226, 137, 159}
+"quot", 1, {34}
+"QUOT", 1, {34}
+"rAarr", 3, {226, 135, 155}
+"race", 3, {226, 136, 189}
+"Racute", 2, {197, 148}
+"racute", 2, {197, 149}
+"radic", 3, {226, 136, 154}
+"raemptyv", 3, {226, 166, 179}
+"rang", 3, {226, 159, 169}
+"Rang", 3, {226, 159, 171}
+"rangd", 3, {226, 166, 146}
+"range", 3, {226, 166, 165}
+"rangle", 3, {226, 159, 169}
+"raquo", 2, {194, 187}
+"rarrap", 3, {226, 165, 181}
+"rarrb", 3, {226, 135, 165}
+"rarrbfs", 3, {226, 164, 160}
+"rarrc", 3, {226, 164, 179}
+"rarr", 3, {226, 134, 146}
+"Rarr", 3, {226, 134, 160}
+"rArr", 3, {226, 135, 146}
+"rarrfs", 3, {226, 164, 158}
+"rarrhk", 3, {226, 134, 170}
+"rarrlp", 3, {226, 134, 172}
+"rarrpl", 3, {226, 165, 133}
+"rarrsim", 3, {226, 165, 180}
+"Rarrtl", 3, {226, 164, 150}
+"rarrtl", 3, {226, 134, 163}
+"rarrw", 3, {226, 134, 157}
+"ratail", 3, {226, 164, 154}
+"rAtail", 3, {226, 164, 156}
+"ratio", 3, {226, 136, 182}
+"rationals", 3, {226, 132, 154}
+"rbarr", 3, {226, 164, 141}
+"rBarr", 3, {226, 164, 143}
+"RBarr", 3, {226, 164, 144}
+"rbbrk", 3, {226, 157, 179}
+"rbrace", 1, {125}
+"rbrack", 1, {93}
+"rbrke", 3, {226, 166, 140}
+"rbrksld", 3, {226, 166, 142}
+"rbrkslu", 3, {226, 166, 144}
+"Rcaron", 2, {197, 152}
+"rcaron", 2, {197, 153}
+"Rcedil", 2, {197, 150}
+"rcedil", 2, {197, 151}
+"rceil", 3, {226, 140, 137}
+"rcub", 1, {125}
+"Rcy", 2, {208, 160}
+"rcy", 2, {209, 128}
+"rdca", 3, {226, 164, 183}
+"rdldhar", 3, {226, 165, 169}
+"rdquo", 3, {226, 128, 157}
+"rdquor", 3, {226, 128, 157}
+"rdsh", 3, {226, 134, 179}
+"real", 3, {226, 132, 156}
+"realine", 3, {226, 132, 155}
+"realpart", 3, {226, 132, 156}
+"reals", 3, {226, 132, 157}
+"Re", 3, {226, 132, 156}
+"rect", 3, {226, 150, 173}
+"reg", 2, {194, 174}
+"REG", 2, {194, 174}
+"ReverseElement", 3, {226, 136, 139}
+"ReverseEquilibrium", 3, {226, 135, 139}
+"ReverseUpEquilibrium", 3, {226, 165, 175}
+"rfisht", 3, {226, 165, 189}
+"rfloor", 3, {226, 140, 139}
+"rfr", 4, {240, 157, 148, 175}
+"Rfr", 3, {226, 132, 156}
+"rHar", 3, {226, 165, 164}
+"rhard", 3, {226, 135, 129}
+"rharu", 3, {226, 135, 128}
+"rharul", 3, {226, 165, 172}
+"Rho", 2, {206, 161}
+"rho", 2, {207, 129}
+"rhov", 2, {207, 177}
+"RightAngleBracket", 3, {226, 159, 169}
+"RightArrowBar", 3, {226, 135, 165}
+"rightarrow", 3, {226, 134, 146}
+"RightArrow", 3, {226, 134, 146}
+"Rightarrow", 3, {226, 135, 146}
+"RightArrowLeftArrow", 3, {226, 135, 132}
+"rightarrowtail", 3, {226, 134, 163}
+"RightCeiling", 3, {226, 140, 137}
+"RightDoubleBracket", 3, {226, 159, 167}
+"RightDownTeeVector", 3, {226, 165, 157}
+"RightDownVectorBar", 3, {226, 165, 149}
+"RightDownVector", 3, {226, 135, 130}
+"RightFloor", 3, {226, 140, 139}
+"rightharpoondown", 3, {226, 135, 129}
+"rightharpoonup", 3, {226, 135, 128}
+"rightleftarrows", 3, {226, 135, 132}
+"rightleftharpoons", 3, {226, 135, 140}
+"rightrightarrows", 3, {226, 135, 137}
+"rightsquigarrow", 3, {226, 134, 157}
+"RightTeeArrow", 3, {226, 134, 166}
+"RightTee", 3, {226, 138, 162}
+"RightTeeVector", 3, {226, 165, 155}
+"rightthreetimes", 3, {226, 139, 140}
+"RightTriangleBar", 3, {226, 167, 144}
+"RightTriangle", 3, {226, 138, 179}
+"RightTriangleEqual", 3, {226, 138, 181}
+"RightUpDownVector", 3, {226, 165, 143}
+"RightUpTeeVector", 3, {226, 165, 156}
+"RightUpVectorBar", 3, {226, 165, 148}
+"RightUpVector", 3, {226, 134, 190}
+"RightVectorBar", 3, {226, 165, 147}
+"RightVector", 3, {226, 135, 128}
+"ring", 2, {203, 154}
+"risingdotseq", 3, {226, 137, 147}
+"rlarr", 3, {226, 135, 132}
+"rlhar", 3, {226, 135, 140}
+"rlm", 3, {226, 128, 143}
+"rmoustache", 3, {226, 142, 177}
+"rmoust", 3, {226, 142, 177}
+"rnmid", 3, {226, 171, 174}
+"roang", 3, {226, 159, 173}
+"roarr", 3, {226, 135, 190}
+"robrk", 3, {226, 159, 167}
+"ropar", 3, {226, 166, 134}
+"ropf", 4, {240, 157, 149, 163}
+"Ropf", 3, {226, 132, 157}
+"roplus", 3, {226, 168, 174}
+"rotimes", 3, {226, 168, 181}
+"RoundImplies", 3, {226, 165, 176}
+"rpar", 1, {41}
+"rpargt", 3, {226, 166, 148}
+"rppolint", 3, {226, 168, 146}
+"rrarr", 3, {226, 135, 137}
+"Rrightarrow", 3, {226, 135, 155}
+"rsaquo", 3, {226, 128, 186}
+"rscr", 4, {240, 157, 147, 135}
+"Rscr", 3, {226, 132, 155}
+"rsh", 3, {226, 134, 177}
+"Rsh", 3, {226, 134, 177}
+"rsqb", 1, {93}
+"rsquo", 3, {226, 128, 153}
+"rsquor", 3, {226, 128, 153}
+"rthree", 3, {226, 139, 140}
+"rtimes", 3, {226, 139, 138}
+"rtri", 3, {226, 150, 185}
+"rtrie", 3, {226, 138, 181}
+"rtrif", 3, {226, 150, 184}
+"rtriltri", 3, {226, 167, 142}
+"RuleDelayed", 3, {226, 167, 180}
+"ruluhar", 3, {226, 165, 168}
+"rx", 3, {226, 132, 158}
+"Sacute", 2, {197, 154}
+"sacute", 2, {197, 155}
+"sbquo", 3, {226, 128, 154}
+"scap", 3, {226, 170, 184}
+"Scaron", 2, {197, 160}
+"scaron", 2, {197, 161}
+"Sc", 3, {226, 170, 188}
+"sc", 3, {226, 137, 187}
+"sccue", 3, {226, 137, 189}
+"sce", 3, {226, 170, 176}
+"scE", 3, {226, 170, 180}
+"Scedil", 2, {197, 158}
+"scedil", 2, {197, 159}
+"Scirc", 2, {197, 156}
+"scirc", 2, {197, 157}
+"scnap", 3, {226, 170, 186}
+"scnE", 3, {226, 170, 182}
+"scnsim", 3, {226, 139, 169}
+"scpolint", 3, {226, 168, 147}
+"scsim", 3, {226, 137, 191}
+"Scy", 2, {208, 161}
+"scy", 2, {209, 129}
+"sdotb", 3, {226, 138, 161}
+"sdot", 3, {226, 139, 133}
+"sdote", 3, {226, 169, 166}
+"searhk", 3, {226, 164, 165}
+"searr", 3, {226, 134, 152}
+"seArr", 3, {226, 135, 152}
+"searrow", 3, {226, 134, 152}
+"sect", 2, {194, 167}
+"semi", 1, {59}
+"seswar", 3, {226, 164, 169}
+"setminus", 3, {226, 136, 150}
+"setmn", 3, {226, 136, 150}
+"sext", 3, {226, 156, 182}
+"Sfr", 4, {240, 157, 148, 150}
+"sfr", 4, {240, 157, 148, 176}
+"sfrown", 3, {226, 140, 162}
+"sharp", 3, {226, 153, 175}
+"SHCHcy", 2, {208, 169}
+"shchcy", 2, {209, 137}
+"SHcy", 2, {208, 168}
+"shcy", 2, {209, 136}
+"ShortDownArrow", 3, {226, 134, 147}
+"ShortLeftArrow", 3, {226, 134, 144}
+"shortmid", 3, {226, 136, 163}
+"shortparallel", 3, {226, 136, 165}
+"ShortRightArrow", 3, {226, 134, 146}
+"ShortUpArrow", 3, {226, 134, 145}
+"shy", 2, {194, 173}
+"Sigma", 2, {206, 163}
+"sigma", 2, {207, 131}
+"sigmaf", 2, {207, 130}
+"sigmav", 2, {207, 130}
+"sim", 3, {226, 136, 188}
+"simdot", 3, {226, 169, 170}
+"sime", 3, {226, 137, 131}
+"simeq", 3, {226, 137, 131}
+"simg", 3, {226, 170, 158}
+"simgE", 3, {226, 170, 160}
+"siml", 3, {226, 170, 157}
+"simlE", 3, {226, 170, 159}
+"simne", 3, {226, 137, 134}
+"simplus", 3, {226, 168, 164}
+"simrarr", 3, {226, 165, 178}
+"slarr", 3, {226, 134, 144}
+"SmallCircle", 3, {226, 136, 152}
+"smallsetminus", 3, {226, 136, 150}
+"smashp", 3, {226, 168, 179}
+"smeparsl", 3, {226, 167, 164}
+"smid", 3, {226, 136, 163}
+"smile", 3, {226, 140, 163}
+"smt", 3, {226, 170, 170}
+"smte", 3, {226, 170, 172}
+"smtes", 3, {226, 170, 172}
+"SOFTcy", 2, {208, 172}
+"softcy", 2, {209, 140}
+"solbar", 3, {226, 140, 191}
+"solb", 3, {226, 167, 132}
+"sol", 1, {47}
+"Sopf", 4, {240, 157, 149, 138}
+"sopf", 4, {240, 157, 149, 164}
+"spades", 3, {226, 153, 160}
+"spadesuit", 3, {226, 153, 160}
+"spar", 3, {226, 136, 165}
+"sqcap", 3, {226, 138, 147}
+"sqcaps", 3, {226, 138, 147}
+"sqcup", 3, {226, 138, 148}
+"sqcups", 3, {226, 138, 148}
+"Sqrt", 3, {226, 136, 154}
+"sqsub", 3, {226, 138, 143}
+"sqsube", 3, {226, 138, 145}
+"sqsubset", 3, {226, 138, 143}
+"sqsubseteq", 3, {226, 138, 145}
+"sqsup", 3, {226, 138, 144}
+"sqsupe", 3, {226, 138, 146}
+"sqsupset", 3, {226, 138, 144}
+"sqsupseteq", 3, {226, 138, 146}
+"square", 3, {226, 150, 161}
+"Square", 3, {226, 150, 161}
+"SquareIntersection", 3, {226, 138, 147}
+"SquareSubset", 3, {226, 138, 143}
+"SquareSubsetEqual", 3, {226, 138, 145}
+"SquareSuperset", 3, {226, 138, 144}
+"SquareSupersetEqual", 3, {226, 138, 146}
+"SquareUnion", 3, {226, 138, 148}
+"squarf", 3, {226, 150, 170}
+"squ", 3, {226, 150, 161}
+"squf", 3, {226, 150, 170}
+"srarr", 3, {226, 134, 146}
+"Sscr", 4, {240, 157, 146, 174}
+"sscr", 4, {240, 157, 147, 136}
+"ssetmn", 3, {226, 136, 150}
+"ssmile", 3, {226, 140, 163}
+"sstarf", 3, {226, 139, 134}
+"Star", 3, {226, 139, 134}
+"star", 3, {226, 152, 134}
+"starf", 3, {226, 152, 133}
+"straightepsilon", 2, {207, 181}
+"straightphi", 2, {207, 149}
+"strns", 2, {194, 175}
+"sub", 3, {226, 138, 130}
+"Sub", 3, {226, 139, 144}
+"subdot", 3, {226, 170, 189}
+"subE", 3, {226, 171, 133}
+"sube", 3, {226, 138, 134}
+"subedot", 3, {226, 171, 131}
+"submult", 3, {226, 171, 129}
+"subnE", 3, {226, 171, 139}
+"subne", 3, {226, 138, 138}
+"subplus", 3, {226, 170, 191}
+"subrarr", 3, {226, 165, 185}
+"subset", 3, {226, 138, 130}
+"Subset", 3, {226, 139, 144}
+"subseteq", 3, {226, 138, 134}
+"subseteqq", 3, {226, 171, 133}
+"SubsetEqual", 3, {226, 138, 134}
+"subsetneq", 3, {226, 138, 138}
+"subsetneqq", 3, {226, 171, 139}
+"subsim", 3, {226, 171, 135}
+"subsub", 3, {226, 171, 149}
+"subsup", 3, {226, 171, 147}
+"succapprox", 3, {226, 170, 184}
+"succ", 3, {226, 137, 187}
+"succcurlyeq", 3, {226, 137, 189}
+"Succeeds", 3, {226, 137, 187}
+"SucceedsEqual", 3, {226, 170, 176}
+"SucceedsSlantEqual", 3, {226, 137, 189}
+"SucceedsTilde", 3, {226, 137, 191}
+"succeq", 3, {226, 170, 176}
+"succnapprox", 3, {226, 170, 186}
+"succneqq", 3, {226, 170, 182}
+"succnsim", 3, {226, 139, 169}
+"succsim", 3, {226, 137, 191}
+"SuchThat", 3, {226, 136, 139}
+"sum", 3, {226, 136, 145}
+"Sum", 3, {226, 136, 145}
+"sung", 3, {226, 153, 170}
+"sup1", 2, {194, 185}
+"sup2", 2, {194, 178}
+"sup3", 2, {194, 179}
+"sup", 3, {226, 138, 131}
+"Sup", 3, {226, 139, 145}
+"supdot", 3, {226, 170, 190}
+"supdsub", 3, {226, 171, 152}
+"supE", 3, {226, 171, 134}
+"supe", 3, {226, 138, 135}
+"supedot", 3, {226, 171, 132}
+"Superset", 3, {226, 138, 131}
+"SupersetEqual", 3, {226, 138, 135}
+"suphsol", 3, {226, 159, 137}
+"suphsub", 3, {226, 171, 151}
+"suplarr", 3, {226, 165, 187}
+"supmult", 3, {226, 171, 130}
+"supnE", 3, {226, 171, 140}
+"supne", 3, {226, 138, 139}
+"supplus", 3, {226, 171, 128}
+"supset", 3, {226, 138, 131}
+"Supset", 3, {226, 139, 145}
+"supseteq", 3, {226, 138, 135}
+"supseteqq", 3, {226, 171, 134}
+"supsetneq", 3, {226, 138, 139}
+"supsetneqq", 3, {226, 171, 140}
+"supsim", 3, {226, 171, 136}
+"supsub", 3, {226, 171, 148}
+"supsup", 3, {226, 171, 150}
+"swarhk", 3, {226, 164, 166}
+"swarr", 3, {226, 134, 153}
+"swArr", 3, {226, 135, 153}
+"swarrow", 3, {226, 134, 153}
+"swnwar", 3, {226, 164, 170}
+"szlig", 2, {195, 159}
+"Tab", 1, {9}
+"target", 3, {226, 140, 150}
+"Tau", 2, {206, 164}
+"tau", 2, {207, 132}
+"tbrk", 3, {226, 142, 180}
+"Tcaron", 2, {197, 164}
+"tcaron", 2, {197, 165}
+"Tcedil", 2, {197, 162}
+"tcedil", 2, {197, 163}
+"Tcy", 2, {208, 162}
+"tcy", 2, {209, 130}
+"tdot", 3, {226, 131, 155}
+"telrec", 3, {226, 140, 149}
+"Tfr", 4, {240, 157, 148, 151}
+"tfr", 4, {240, 157, 148, 177}
+"there4", 3, {226, 136, 180}
+"therefore", 3, {226, 136, 180}
+"Therefore", 3, {226, 136, 180}
+"Theta", 2, {206, 152}
+"theta", 2, {206, 184}
+"thetasym", 2, {207, 145}
+"thetav", 2, {207, 145}
+"thickapprox", 3, {226, 137, 136}
+"thicksim", 3, {226, 136, 188}
+"ThickSpace", 3, {226, 129, 159}
+"ThinSpace", 3, {226, 128, 137}
+"thinsp", 3, {226, 128, 137}
+"thkap", 3, {226, 137, 136}
+"thksim", 3, {226, 136, 188}
+"THORN", 2, {195, 158}
+"thorn", 2, {195, 190}
+"tilde", 2, {203, 156}
+"Tilde", 3, {226, 136, 188}
+"TildeEqual", 3, {226, 137, 131}
+"TildeFullEqual", 3, {226, 137, 133}
+"TildeTilde", 3, {226, 137, 136}
+"timesbar", 3, {226, 168, 177}
+"timesb", 3, {226, 138, 160}
+"times", 2, {195, 151}
+"timesd", 3, {226, 168, 176}
+"tint", 3, {226, 136, 173}
+"toea", 3, {226, 164, 168}
+"topbot", 3, {226, 140, 182}
+"topcir", 3, {226, 171, 177}
+"top", 3, {226, 138, 164}
+"Topf", 4, {240, 157, 149, 139}
+"topf", 4, {240, 157, 149, 165}
+"topfork", 3, {226, 171, 154}
+"tosa", 3, {226, 164, 169}
+"tprime", 3, {226, 128, 180}
+"trade", 3, {226, 132, 162}
+"TRADE", 3, {226, 132, 162}
+"triangle", 3, {226, 150, 181}
+"triangledown", 3, {226, 150, 191}
+"triangleleft", 3, {226, 151, 131}
+"trianglelefteq", 3, {226, 138, 180}
+"triangleq", 3, {226, 137, 156}
+"triangleright", 3, {226, 150, 185}
+"trianglerighteq", 3, {226, 138, 181}
+"tridot", 3, {226, 151, 172}
+"trie", 3, {226, 137, 156}
+"triminus", 3, {226, 168, 186}
+"TripleDot", 3, {226, 131, 155}
+"triplus", 3, {226, 168, 185}
+"trisb", 3, {226, 167, 141}
+"tritime", 3, {226, 168, 187}
+"trpezium", 3, {226, 143, 162}
+"Tscr", 4, {240, 157, 146, 175}
+"tscr", 4, {240, 157, 147, 137}
+"TScy", 2, {208, 166}
+"tscy", 2, {209, 134}
+"TSHcy", 2, {208, 139}
+"tshcy", 2, {209, 155}
+"Tstrok", 2, {197, 166}
+"tstrok", 2, {197, 167}
+"twixt", 3, {226, 137, 172}
+"twoheadleftarrow", 3, {226, 134, 158}
+"twoheadrightarrow", 3, {226, 134, 160}
+"Uacute", 2, {195, 154}
+"uacute", 2, {195, 186}
+"uarr", 3, {226, 134, 145}
+"Uarr", 3, {226, 134, 159}
+"uArr", 3, {226, 135, 145}
+"Uarrocir", 3, {226, 165, 137}
+"Ubrcy", 2, {208, 142}
+"ubrcy", 2, {209, 158}
+"Ubreve", 2, {197, 172}
+"ubreve", 2, {197, 173}
+"Ucirc", 2, {195, 155}
+"ucirc", 2, {195, 187}
+"Ucy", 2, {208, 163}
+"ucy", 2, {209, 131}
+"udarr", 3, {226, 135, 133}
+"Udblac", 2, {197, 176}
+"udblac", 2, {197, 177}
+"udhar", 3, {226, 165, 174}
+"ufisht", 3, {226, 165, 190}
+"Ufr", 4, {240, 157, 148, 152}
+"ufr", 4, {240, 157, 148, 178}
+"Ugrave", 2, {195, 153}
+"ugrave", 2, {195, 185}
+"uHar", 3, {226, 165, 163}
+"uharl", 3, {226, 134, 191}
+"uharr", 3, {226, 134, 190}
+"uhblk", 3, {226, 150, 128}
+"ulcorn", 3, {226, 140, 156}
+"ulcorner", 3, {226, 140, 156}
+"ulcrop", 3, {226, 140, 143}
+"ultri", 3, {226, 151, 184}
+"Umacr", 2, {197, 170}
+"umacr", 2, {197, 171}
+"uml", 2, {194, 168}
+"UnderBar", 1, {95}
+"UnderBrace", 3, {226, 143, 159}
+"UnderBracket", 3, {226, 142, 181}
+"UnderParenthesis", 3, {226, 143, 157}
+"Union", 3, {226, 139, 131}
+"UnionPlus", 3, {226, 138, 142}
+"Uogon", 2, {197, 178}
+"uogon", 2, {197, 179}
+"Uopf", 4, {240, 157, 149, 140}
+"uopf", 4, {240, 157, 149, 166}
+"UpArrowBar", 3, {226, 164, 146}
+"uparrow", 3, {226, 134, 145}
+"UpArrow", 3, {226, 134, 145}
+"Uparrow", 3, {226, 135, 145}
+"UpArrowDownArrow", 3, {226, 135, 133}
+"updownarrow", 3, {226, 134, 149}
+"UpDownArrow", 3, {226, 134, 149}
+"Updownarrow", 3, {226, 135, 149}
+"UpEquilibrium", 3, {226, 165, 174}
+"upharpoonleft", 3, {226, 134, 191}
+"upharpoonright", 3, {226, 134, 190}
+"uplus", 3, {226, 138, 142}
+"UpperLeftArrow", 3, {226, 134, 150}
+"UpperRightArrow", 3, {226, 134, 151}
+"upsi", 2, {207, 133}
+"Upsi", 2, {207, 146}
+"upsih", 2, {207, 146}
+"Upsilon", 2, {206, 165}
+"upsilon", 2, {207, 133}
+"UpTeeArrow", 3, {226, 134, 165}
+"UpTee", 3, {226, 138, 165}
+"upuparrows", 3, {226, 135, 136}
+"urcorn", 3, {226, 140, 157}
+"urcorner", 3, {226, 140, 157}
+"urcrop", 3, {226, 140, 142}
+"Uring", 2, {197, 174}
+"uring", 2, {197, 175}
+"urtri", 3, {226, 151, 185}
+"Uscr", 4, {240, 157, 146, 176}
+"uscr", 4, {240, 157, 147, 138}
+"utdot", 3, {226, 139, 176}
+"Utilde", 2, {197, 168}
+"utilde", 2, {197, 169}
+"utri", 3, {226, 150, 181}
+"utrif", 3, {226, 150, 180}
+"uuarr", 3, {226, 135, 136}
+"Uuml", 2, {195, 156}
+"uuml", 2, {195, 188}
+"uwangle", 3, {226, 166, 167}
+"vangrt", 3, {226, 166, 156}
+"varepsilon", 2, {207, 181}
+"varkappa", 2, {207, 176}
+"varnothing", 3, {226, 136, 133}
+"varphi", 2, {207, 149}
+"varpi", 2, {207, 150}
+"varpropto", 3, {226, 136, 157}
+"varr", 3, {226, 134, 149}
+"vArr", 3, {226, 135, 149}
+"varrho", 2, {207, 177}
+"varsigma", 2, {207, 130}
+"varsubsetneq", 3, {226, 138, 138}
+"varsubsetneqq", 3, {226, 171, 139}
+"varsupsetneq", 3, {226, 138, 139}
+"varsupsetneqq", 3, {226, 171, 140}
+"vartheta", 2, {207, 145}
+"vartriangleleft", 3, {226, 138, 178}
+"vartriangleright", 3, {226, 138, 179}
+"vBar", 3, {226, 171, 168}
+"Vbar", 3, {226, 171, 171}
+"vBarv", 3, {226, 171, 169}
+"Vcy", 2, {208, 146}
+"vcy", 2, {208, 178}
+"vdash", 3, {226, 138, 162}
+"vDash", 3, {226, 138, 168}
+"Vdash", 3, {226, 138, 169}
+"VDash", 3, {226, 138, 171}
+"Vdashl", 3, {226, 171, 166}
+"veebar", 3, {226, 138, 187}
+"vee", 3, {226, 136, 168}
+"Vee", 3, {226, 139, 129}
+"veeeq", 3, {226, 137, 154}
+"vellip", 3, {226, 139, 174}
+"verbar", 1, {124}
+"Verbar", 3, {226, 128, 150}
+"vert", 1, {124}
+"Vert", 3, {226, 128, 150}
+"VerticalBar", 3, {226, 136, 163}
+"VerticalLine", 1, {124}
+"VerticalSeparator", 3, {226, 157, 152}
+"VerticalTilde", 3, {226, 137, 128}
+"VeryThinSpace", 3, {226, 128, 138}
+"Vfr", 4, {240, 157, 148, 153}
+"vfr", 4, {240, 157, 148, 179}
+"vltri", 3, {226, 138, 178}
+"vnsub", 3, {226, 138, 130}
+"vnsup", 3, {226, 138, 131}
+"Vopf", 4, {240, 157, 149, 141}
+"vopf", 4, {240, 157, 149, 167}
+"vprop", 3, {226, 136, 157}
+"vrtri", 3, {226, 138, 179}
+"Vscr", 4, {240, 157, 146, 177}
+"vscr", 4, {240, 157, 147, 139}
+"vsubnE", 3, {226, 171, 139}
+"vsubne", 3, {226, 138, 138}
+"vsupnE", 3, {226, 171, 140}
+"vsupne", 3, {226, 138, 139}
+"Vvdash", 3, {226, 138, 170}
+"vzigzag", 3, {226, 166, 154}
+"Wcirc", 2, {197, 180}
+"wcirc", 2, {197, 181}
+"wedbar", 3, {226, 169, 159}
+"wedge", 3, {226, 136, 167}
+"Wedge", 3, {226, 139, 128}
+"wedgeq", 3, {226, 137, 153}
+"weierp", 3, {226, 132, 152}
+"Wfr", 4, {240, 157, 148, 154}
+"wfr", 4, {240, 157, 148, 180}
+"Wopf", 4, {240, 157, 149, 142}
+"wopf", 4, {240, 157, 149, 168}
+"wp", 3, {226, 132, 152}
+"wr", 3, {226, 137, 128}
+"wreath", 3, {226, 137, 128}
+"Wscr", 4, {240, 157, 146, 178}
+"wscr", 4, {240, 157, 147, 140}
+"xcap", 3, {226, 139, 130}
+"xcirc", 3, {226, 151, 175}
+"xcup", 3, {226, 139, 131}
+"xdtri", 3, {226, 150, 189}
+"Xfr", 4, {240, 157, 148, 155}
+"xfr", 4, {240, 157, 148, 181}
+"xharr", 3, {226, 159, 183}
+"xhArr", 3, {226, 159, 186}
+"Xi", 2, {206, 158}
+"xi", 2, {206, 190}
+"xlarr", 3, {226, 159, 181}
+"xlArr", 3, {226, 159, 184}
+"xmap", 3, {226, 159, 188}
+"xnis", 3, {226, 139, 187}
+"xodot", 3, {226, 168, 128}
+"Xopf", 4, {240, 157, 149, 143}
+"xopf", 4, {240, 157, 149, 169}
+"xoplus", 3, {226, 168, 129}
+"xotime", 3, {226, 168, 130}
+"xrarr", 3, {226, 159, 182}
+"xrArr", 3, {226, 159, 185}
+"Xscr", 4, {240, 157, 146, 179}
+"xscr", 4, {240, 157, 147, 141}
+"xsqcup", 3, {226, 168, 134}
+"xuplus", 3, {226, 168, 132}
+"xutri", 3, {226, 150, 179}
+"xvee", 3, {226, 139, 129}
+"xwedge", 3, {226, 139, 128}
+"Yacute", 2, {195, 157}
+"yacute", 2, {195, 189}
+"YAcy", 2, {208, 175}
+"yacy", 2, {209, 143}
+"Ycirc", 2, {197, 182}
+"ycirc", 2, {197, 183}
+"Ycy", 2, {208, 171}
+"ycy", 2, {209, 139}
+"yen", 2, {194, 165}
+"Yfr", 4, {240, 157, 148, 156}
+"yfr", 4, {240, 157, 148, 182}
+"YIcy", 2, {208, 135}
+"yicy", 2, {209, 151}
+"Yopf", 4, {240, 157, 149, 144}
+"yopf", 4, {240, 157, 149, 170}
+"Yscr", 4, {240, 157, 146, 180}
+"yscr", 4, {240, 157, 147, 142}
+"YUcy", 2, {208, 174}
+"yucy", 2, {209, 142}
+"yuml", 2, {195, 191}
+"Yuml", 2, {197, 184}
+"Zacute", 2, {197, 185}
+"zacute", 2, {197, 186}
+"Zcaron", 2, {197, 189}
+"zcaron", 2, {197, 190}
+"Zcy", 2, {208, 151}
+"zcy", 2, {208, 183}
+"Zdot", 2, {197, 187}
+"zdot", 2, {197, 188}
+"zeetrf", 3, {226, 132, 168}
+"ZeroWidthSpace", 3, {226, 128, 139}
+"Zeta", 2, {206, 150}
+"zeta", 2, {206, 182}
+"zfr", 4, {240, 157, 148, 183}
+"Zfr", 3, {226, 132, 168}
+"ZHcy", 2, {208, 150}
+"zhcy", 2, {208, 182}
+"zigrarr", 3, {226, 135, 157}
+"zopf", 4, {240, 157, 149, 171}
+"Zopf", 3, {226, 132, 164}
+"Zscr", 4, {240, 157, 146, 181}
+"zscr", 4, {240, 157, 147, 143}
+"zwj", 3, {226, 128, 141}
+"zwnj", 3, {226, 128, 140}


[05/16] lucy-clownfish git commit: Add test for man page creator

Posted by nw...@apache.org.
Add test for man page creator


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/a4c0106f
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/a4c0106f
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/a4c0106f

Branch: refs/heads/markdown
Commit: a4c0106fd5d8fccd78ed4e40802c4859c977898d
Parents: 95e36db
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Nov 9 21:47:29 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 17:33:56 2014 +0100

----------------------------------------------------------------------
 compiler/src/CFCTest.c     |   1 +
 compiler/src/CFCTest.h     |   1 +
 compiler/src/CFCTestCMan.c | 107 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a4c0106f/compiler/src/CFCTest.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTest.c b/compiler/src/CFCTest.c
index 21cff48..1692f58 100644
--- a/compiler/src/CFCTest.c
+++ b/compiler/src/CFCTest.c
@@ -128,6 +128,7 @@ static const CFCTestBatch *const S_batches[] = {
     &CFCTEST_BATCH_FILE,
     &CFCTEST_BATCH_HIERARCHY,
     &CFCTEST_BATCH_PARSER,
+    &CFCTEST_BATCH_C_MAN,
     NULL
 };
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a4c0106f/compiler/src/CFCTest.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTest.h b/compiler/src/CFCTest.h
index dbb3a17..f78e07f 100644
--- a/compiler/src/CFCTest.h
+++ b/compiler/src/CFCTest.h
@@ -155,6 +155,7 @@ CFCTest_set_file_times(const char *path, time_t time);
 
 extern const CFCTestBatch CFCTEST_BATCH_CLASS;
 extern const CFCTestBatch CFCTEST_BATCH_C_BLOCK;
+extern const CFCTestBatch CFCTEST_BATCH_C_MAN;
 extern const CFCTestBatch CFCTEST_BATCH_DOCU_COMMENT;
 extern const CFCTestBatch CFCTEST_BATCH_FILE;
 extern const CFCTestBatch CFCTEST_BATCH_FILE_SPEC;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a4c0106f/compiler/src/CFCTestCMan.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestCMan.c b/compiler/src/CFCTestCMan.c
new file mode 100644
index 0000000..6544d01
--- /dev/null
+++ b/compiler/src/CFCTestCMan.c
@@ -0,0 +1,107 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+
+#define CFC_USE_TEST_MACROS
+#include "CFCBase.h"
+#include "CFCClass.h"
+#include "CFCCMan.h"
+#include "CFCDocuComment.h"
+#include "CFCParcel.h"
+#include "CFCTest.h"
+#include "CFCUtil.h"
+
+#ifndef true
+  #define true 1
+  #define false 0
+#endif
+
+static void
+S_run_tests(CFCTest *test);
+
+const CFCTestBatch CFCTEST_BATCH_C_MAN = {
+    "Clownfish::CFC::Binding::C::Man",
+    1,
+    S_run_tests
+};
+
+static void
+S_run_tests(CFCTest *test) {
+    CFCParcel *parcel = CFCParcel_new("Neato", NULL, NULL, NULL);
+    CFCDocuComment *docu = CFCDocuComment_parse(
+        "/** Test man page creator.\n"
+        " * \n"
+        " * # Heading 1\n"
+        " * \n"
+        " * Paragraph: *emphasized*, **strong**, `code`.\n"
+        " * \n"
+        " * Paragraph: [link](http://example.com/).\n"
+        " * \n"
+        " *     Code 1\n"
+        " *     Code 2\n"
+        " * \n"
+        " * * List item 1\n"
+        " *   * List item 1.1\n"
+        " * \n"
+        " *   Paragraph in list\n"
+        " * \n"
+        " * Paragraph after list\n"
+        " */\n"
+    );
+    CFCClass *klass
+        = CFCClass_create(parcel, "public", "Neato::Object", NULL, NULL,
+                          docu, NULL, NULL, 0, 0);
+    char *man_page = CFCCMan_create_man_page(klass);
+    const char *expected_output =
+        ".TH Neato::Object 3\n"
+        ".SH NAME\n"
+        "Neato::Object \\- Test man page creator.\n"
+        ".SH DESCRIPTION\n"
+        ".SS\n"
+        "Heading 1\n"
+        "Paragraph: \\fIemphasized\\f[], \\fBstrong\\f[], \\FCcode\\F[]\\&.\n"
+        "\n"
+        "Paragraph: \n"
+        ".UR http://example.com/\n"
+        "link\n"
+        ".UE\n"
+        "\\&.\n"
+        ".IP\n"
+        ".nf\n"
+        ".fam C\n"
+        "Code 1\n"
+        "Code 2\n"
+        ".fam\n"
+        ".fi\n"
+        ".IP \\(bu\n"
+        "List item 1\n"
+        ".RS\n"
+        ".IP \\(bu\n"
+        "List item 1.1\n"
+        ".RE\n"
+        ".IP\n"
+        "Paragraph in list\n"
+        ".P\n"
+        "Paragraph after list\n";
+    STR_EQ(test, man_page, expected_output, "create man page");
+
+    FREEMEM(man_page);
+    CFCBase_decref((CFCBase*)klass);
+    CFCBase_decref((CFCBase*)docu);
+    CFCBase_decref((CFCBase*)parcel);
+}
+


[15/16] lucy-clownfish git commit: Build Perl bindings with CommonMark

Posted by nw...@apache.org.
Build Perl bindings with CommonMark


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/12d994b3
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/12d994b3
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/12d994b3

Branch: refs/heads/markdown
Commit: 12d994b3f55d3ba71d5c6e6c2a3edc3a451b262a
Parents: 52eed70
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Nov 10 17:35:04 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 18:35:49 2014 +0100

----------------------------------------------------------------------
 compiler/perl/buildlib/Clownfish/CFC/Build.pm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/12d994b3/compiler/perl/buildlib/Clownfish/CFC/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/buildlib/Clownfish/CFC/Build.pm b/compiler/perl/buildlib/Clownfish/CFC/Build.pm
index 342d8a3..45e49b5 100644
--- a/compiler/perl/buildlib/Clownfish/CFC/Build.pm
+++ b/compiler/perl/buildlib/Clownfish/CFC/Build.pm
@@ -42,29 +42,34 @@ my $CHARMONIZER_C;
 my $LEMON_DIR;
 my $INCLUDE;
 my $CFC_SOURCE_DIR;
+my $MODULES_DIR;
 my $IS_CPAN = -e 'LICENSE';
 if ($IS_CPAN) {
     $CHARMONIZER_C  = 'charmonizer.c';
     $INCLUDE        = 'include';
     $LEMON_DIR      = 'lemon';
     $CFC_SOURCE_DIR = 'src';
+    $MODULES_DIR    = 'modules';
 }
 else {
     $CHARMONIZER_C = catfile( updir(), 'common', 'charmonizer.c' );
     $INCLUDE        = catdir( updir(), 'include' );
     $LEMON_DIR      = catdir( updir(), updir(), 'lemon' );
     $CFC_SOURCE_DIR = catdir( updir(), 'src' );
+    $MODULES_DIR    = catdir( updir(), 'modules' );
 }
-my $LEMON_EXE_PATH = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
-my $PPPORT_H_PATH  = catfile( $INCLUDE,   'ppport.h' );
+my $CMARK_SOURCE_DIR = catdir( $MODULES_DIR, 'CommonMark', 'src' );
+my $LEMON_EXE_PATH   = catfile( $LEMON_DIR, "lemon$Config{_exe}" );
+my $PPPORT_H_PATH    = catfile( $INCLUDE,   'ppport.h' );
 
 sub new {
     my ( $class, %args ) = @_;
-    $args{c_source} = $CFC_SOURCE_DIR;
+    $args{c_source} = [ $CFC_SOURCE_DIR, $CMARK_SOURCE_DIR ];
     $args{include_dirs} ||= [];
     my @aux_include = (
         $INCLUDE,
         $CFC_SOURCE_DIR,
+        $CMARK_SOURCE_DIR,
         curdir(),    # for charmony.h
     );
     push @{ $args{include_dirs} }, @aux_include;


[09/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/html/html_unescape.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/html/html_unescape.h b/compiler/modules/CommonMark/src/html/html_unescape.h
new file mode 100644
index 0000000..097f2cf
--- /dev/null
+++ b/compiler/modules/CommonMark/src/html/html_unescape.h
@@ -0,0 +1,9736 @@
+/* ANSI-C code produced by gperf version 3.0.3 */
+/* Command-line: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gperf -L ANSI-C -I -t -N find_entity -H hash_entity -K entity -C -l --null-strings -m5 src/html/html_unescape.gperf  */
+/* Computed positions: -k'1-7,10,12,$' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bu...@gnu.org>."
+#endif
+
+#line 1 "src/html/html_unescape.gperf"
+struct html_ent {
+	const char *entity;
+	unsigned int utf8_len;
+	unsigned char utf8[4];
+};
+#include <string.h>
+
+#define TOTAL_KEYWORDS 2125
+#define MIN_WORD_LENGTH 2
+#define MAX_WORD_LENGTH 31
+#define MIN_HASH_VALUE 39
+#define MAX_HASH_VALUE 16000
+/* maximum key range = 15962, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash_entity (register const char *str, register unsigned int len)
+{
+  static const unsigned short asso_values[] =
+    {
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,     2,
+          3,     7,     2,     4,     8, 16001,    10, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001,  1890,  1538,   220,   165,  1045,
+        535,  1971,  1187,  1262,    35,   126,   201,   133,   350,  1487,
+       1965,     3,   478,   134,     8,   147,    73,    41,    23,   212,
+          9, 16001,     2, 16001,     2, 16001, 16001,  4154,    29,  3168,
+        429,    10,   146,  1925,  2307,   280,  1313,  1924,     4,   651,
+         27,  1031,    65,   176,     2,     6,    17,    15,   107,   482,
+       3207,  3865,   757,   131,   178,     4,     4, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001,
+      16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001, 16001
+    };
+  register unsigned int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[11]];
+      /*FALLTHROUGH*/
+      case 11:
+      case 10:
+        hval += asso_values[(unsigned char)str[9]];
+      /*FALLTHROUGH*/
+      case 9:
+      case 8:
+      case 7:
+        hval += asso_values[(unsigned char)str[6]];
+      /*FALLTHROUGH*/
+      case 6:
+        hval += asso_values[(unsigned char)str[5]];
+      /*FALLTHROUGH*/
+      case 5:
+        hval += asso_values[(unsigned char)str[4]+1];
+      /*FALLTHROUGH*/
+      case 4:
+        hval += asso_values[(unsigned char)str[3]+3];
+      /*FALLTHROUGH*/
+      case 3:
+        hval += asso_values[(unsigned char)str[2]+1];
+      /*FALLTHROUGH*/
+      case 2:
+        hval += asso_values[(unsigned char)str[1]+4];
+      /*FALLTHROUGH*/
+      case 1:
+        hval += asso_values[(unsigned char)str[0]];
+        break;
+    }
+  return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+const struct html_ent *
+find_entity (register const char *str, register unsigned int len)
+{
+  static const unsigned char lengthtable[] =
+    {
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  4,
+       0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  4,  0,  0,  3,
+       0,  0,  0,  0,  0,  0,  6,  0,  6,  5,  0,  5,  3,  4,
+       3,  4,  0,  4,  0,  2,  5,  4,  0,  0,  0,  2,  0,  7,
+       0,  7,  3,  0,  5,  0,  0,  0,  0,  0,  4,  0,  0,  6,
+       0,  0,  0,  3,  6,  0,  4,  0,  0,  0,  0,  6,  4,  5,
+       0,  0,  0,  5,  0,  5,  0,  6,  0,  0,  0,  4,  5,  5,
+       5,  3,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  9,  0,
+       0,  0,  0,  3,  4,  0,  3,  0,  0,  5,  0,  0,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  5,  0,
+       5,  0,  5,  6,  0,  6,  5,  0,  2,  5,  0,  5,  0,  0,
+       0,  0,  4,  0,  0,  0,  3,  0,  3,  5,  0,  0,  5,  0,
+       0,  0,  6,  0, 10,  0,  4,  0,  0,  5,  3,  5,  0,  0,
+       0,  0,  0,  0,  0,  5,  0,  3,  0,  0,  0,  0,  6,  6,
+       0,  6,  0,  0,  0,  0,  6,  0,  6,  0,  2,  0,  0,  0,
+       4,  7,  0,  7,  0,  5,  0,  0,  0,  0,  0,  0,  0,  3,
+       0,  4,  0,  4,  6,  0,  3,  0,  0,  0,  0,  0,  0,  4,
+       4,  3,  0,  4,  0,  0,  2,  0,  0,  0,  4,  0,  4,  0,
+       0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+      13,  0,  2,  0,  0,  0,  5,  0,  2,  0,  0,  0,  0,  0,
+       0,  0,  3,  2,  4,  0,  6,  0,  0,  3,  0,  2,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  6,  0,  3,  4,  0,  0,  0,
+       0,  4,  6,  0,  0,  0,  5,  5,  5,  0, 13,  0,  0,  4,
+       0,  0,  5,  0,  4,  4,  5, 17, 18,  0,  0,  0,  0,  0,
+       5,  0,  0, 17,  0,  0,  0,  0,  0,  5,  5,  0,  0,  0,
+       5,  5,  0,  0,  0,  8,  0,  0,  0,  3,  0,  0,  6,  3,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  5,  6,  0,  0,
+       0,  4,  0,  0,  5,  0,  6,  6,  6,  6,  6,  6,  6,  0,
+       0,  6,  0,  6,  0,  6,  6,  6,  6,  6,  6,  0,  0,  0,
+       6,  0,  6,  3,  4,  0,  0,  4,  3,  5,  0,  0,  3,  0,
+       0,  0, 11,  5,  0,  0,  0,  4,  0,  0,  6,  0,  0,  0,
+       5,  0,  0,  0,  5,  0,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  5,  0,  0,  0,  0,  0,  5,  3,  0,  0,  4,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  4,  0,  4,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  5,  0,  0,  0,  0,
+       3,  6,  0,  0,  0,  0,  0,  8,  8,  0,  0,  0,  4,  6,
+       0,  0,  8,  0,  8,  0,  2,  0,  0,  0,  0,  4,  0,  0,
+       0,  4,  0,  6,  0,  0,  0,  0,  6,  0,  4,  0,  0,  0,
+       0,  6,  0,  5,  6,  2,  5,  8,  5,  0,  0,  4,  0,  4,
+       0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  9,  0,  4,  4,
+       4,  0,  4,  6,  4,  4,  4,  0,  0,  0,  5,  4,  5,  4,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  4,  0,  4,  5,  4,
+       5,  0,  0,  4,  0,  5,  0,  0,  0,  4,  0,  0,  0,  0,
+       4,  4,  0,  5,  0,  0, 11,  0,  0,  6,  0,  0,  3,  0,
+       0,  0,  0,  6,  0,  4,  0,  0,  4,  0,  0,  0,  0,  4,
+       0,  0,  0,  0,  7,  4,  4,  0,  7,  0,  0,  0,  0,  0,
+       5,  0,  0,  0,  3,  8,  4,  0,  0,  0,  5,  0,  6,  0,
+       0,  0,  0,  6,  0,  4,  0,  0,  0,  5,  0,  6,  0,  0,
+       0,  5,  5,  0,  0,  3,  6,  2,  0,  0,  4,  0,  0,  7,
+       0,  4,  0,  4,  4,  4,  3,  5,  0,  0,  0,  0,  0,  0,
+       6,  0,  4,  4,  0,  0,  0, 12, 13,  0,  0,  6,  8,  0,
+       2,  0,  0, 17,  0,  0,  0,  4,  0,  5,  0,  7,  0,  5,
+       0,  0,  0,  5,  4,  5,  0,  0,  3,  0,  0,  0,  5,  0,
+       5, 12, 13,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  4,  0,  0,  0,  7,  0,  0,  6,  6,  6,  0,  4,  0,
+       0,  0,  0, 17,  0,  0,  4,  5,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  5,  3,  6,  9,  0,  0,
+       0,  9,  0,  0,  0,  0,  0,  6,  4,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 19,  0,  5,  0,  0, 17,  0,  0,
+      14,  0,  0,  0,  0, 12,  4,  0,  0,  0,  4,  0,  2,  0,
+       4,  0,  6,  0,  0,  3,  0,  0,  0,  3,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  4,  4,  0,
+       4,  0,  4,  4,  4,  0,  0,  0,  0,  4,  0,  4,  0,  4,
+       9,  0,  0,  4,  2,  0,  0,  4,  2,  4,  4,  0,  0,  0,
+       0,  4,  6,  0,  0,  6,  9,  4,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  4,  2,  0,  0,  0,  0,  0,  0,  4,  0,  0,
+       0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0,  0, 10,  0,  0,  0, 10,  6,  0,  0,
+       0,  0,  6,  4,  6,  4,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0,  9,  0,  0,  4,  0,  0,  0,  0,  0,
+       7,  4,  4,  7,  0,  7,  5,  0,  0,  6,  4,  4,  4,  0,
+       4,  4,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  4,  0,
+       0,  0,  4,  0,  0,  4,  4,  6,  0,  0,  0,  3,  5,  3,
+       5, 11,  4,  0,  0,  4,  0,  0,  0,  5,  0,  0,  0,  0,
+       7,  0,  0,  0,  0,  5,  0,  5,  0,  0,  0,  3,  5,  4,
+       0,  0,  0,  5,  0,  6,  9,  7,  2,  0,  4,  0,  0,  4,
+       0,  0,  0,  0,  4,  5,  6,  0,  0,  0,  0,  9, 10,  0,
+       0,  0,  5,  0,  0,  0,  0, 11,  0,  0,  6,  0,  0,  0,
+       0,  0,  0,  4,  8,  6,  0,  0,  0,  0,  0,  8,  0,  0,
+       0,  0,  0,  0,  0,  5,  6,  0,  0,  0, 13,  5,  5,  6,
+       0,  0,  0,  0,  2,  0,  0,  0,  4,  2,  4,  0,  0,  6,
+       4,  0,  4,  0,  0,  0,  4,  0, 21,  0,  0,  0,  6,  0,
+       3,  0,  0,  0,  6,  6,  0,  3, 13,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  7,  0,  0,  0,  0,
+       0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  4,  0,  6,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  7,  3,  0,  0,
+       0,  0,  0,  0,  0,  7,  3,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  3,  3,  0,
+       3, 15,  3,  3,  3,  0,  0,  0,  3,  3,  6,  3,  6,  0,
+       0,  0,  0,  3,  0,  0,  4,  3,  0,  3,  0, 12,  0,  0,
+       0,  3,  0,  4,  0,  0,  0,  3,  0, 12,  0,  4,  5,  0,
+       9,  0,  0,  7,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  3,  0,  0,  0,  0,  0,  5,  0,  3,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  4,  0,  0,  0,
+       4,  0,  0,  0,  0,  0,  0,  0,  0, 12,  0,  0,  0,  0,
+       0,  5,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  5,
+       0,  3,  3,  0,  0,  6,  0,  0,  0,  0,  0,  4,  0,  0,
+       3,  3,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  3,  7,  0,  0,  8,  0,  0,  0,  0,
+       0,  0,  3,  4,  0,  6,  0,  0,  0, 15,  0,  0,  0,  0,
+       0,  0,  0,  9,  0,  0,  0,  2,  0,  0,  0,  0,  9,  3,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  7,  3, 24,  0,  0,
+       0,  0,  5,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  6,  7,  4,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  3,  3,
+       0,  4,  0,  7,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,
+       0,  5,  2,  0,  0,  0,  6,  0,  3,  8,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  4,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  5,  0,  9,  5,  7,  0,  0,  0,  0,  0,  0,  0,
+       0,  7, 15,  7,  8,  4,  0,  5,  0,  0,  6,  0,  0,  0,
+       0,  0,  0,  0,  4,  4,  5,  0,  0,  0,  0,  6, 14,  3,
+      15,  0,  6,  0,  0,  0,  3,  0,  3,  3,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  6,  0,  0,  0,
+       0,  0,  0,  5,  0,  0,  5, 16,  0,  5, 10,  0,  0,  0,
+       5,  7,  0,  5,  0,  0,  6,  0,  3,  0,  0, 11,  5,  0,
+       0,  4,  5,  0,  0,  5,  0,  0,  3,  0,  0,  0,  0,  8,
+       0,  0,  0,  5,  0,  0,  0,  6,  3,  0,  0,  0,  0,  0,
+       5,  0,  0,  3,  3,  3,  0,  0,  0,  6,  0,  0,  5,  6,
+       0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0, 11,  0,  6,  0,  6,  0,  0, 13,  0,  0,  7,
+       0,  0,  0,  0,  7,  0,  6,  4,  5,  0,  3,  0,  0,  5,
+       3,  0,  0,  0,  0,  0,  6,  0,  0,  4,  0,  0,  0,  0,
+       3,  6,  5,  0,  0,  0,  0, 11,  0,  4,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,
+       0, 11,  0,  5,  5,  0,  0,  0,  0,  0,  0,  3,  0,  0,
+       0,  0,  0,  8,  0,  7,  4,  0,  0,  0,  0,  5,  4,  9,
+       0,  0,  5,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  9,
+       0,  6,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0, 11,
+       0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  7,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  4,  0,  0, 14,  5,  0,  0,  8,
+       0,  0,  0, 20,  7,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       3,  0,  0,  4,  6,  0,  0,  0,  0,  6,  0,  0,  0,  7,
+       0,  3,  6,  4,  6,  0,  0,  0,  0,  0,  0,  6,  3,  4,
+       0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,  0,
+       0, 11,  2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  4,
+       0,  0,  0,  0,  0,  0,  0, 13, 18,  5,  0,  3,  0,  7,
+       0,  4,  0,  0,  0,  4,  0,  0, 10, 11,  0,  0,  0,  6,
+       0,  6,  0,  0,  5,  0,  5, 12, 12,  0,  0,  0,  4,  0,
+       0, 14,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,
+      14,  0,  0,  0,  2,  4,  8,  4,  0,  3,  0,  0,  7,  0,
+       3,  0,  0,  0,  3,  2,  0,  0,  0,  0,  6,  0,  6,  4,
+       6,  7,  6,  6,  6,  0, 10,  0,  0,  0,  3,  6,  0,  4,
+       0,  0,  0,  0,  0,  4,  0,  6,  6,  0,  4,  0,  0,  0,
+       7,  0,  0,  7,  0,  0,  4,  0,  4,  0,  5,  6,  0,  6,
+       0,  3,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,
+       9,  0,  0,  0,  0,  0,  8, 14,  0,  3,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  7,  5,  0,  0,  0,  4,  0,  0,  0,
+      17,  7,  0,  0,  4,  0,  0,  7,  0,  5,  0,  0,  7,  5,
+       0,  0,  4,  0,  7,  2, 20,  0,  0,  0,  0, 13,  0,  0,
+       0,  0,  6,  0,  7,  3,  5,  4,  0,  0,  0,  0,  5,  5,
+       0,  0,  0,  0,  0,  4,  5,  0,  0,  0,  0,  0,  0,  0,
+       5,  0,  5,  0,  0,  6,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  4,  9,  0,  5, 12,  0,  0,  0,  0,  5,  0,  5,
+       4,  0,  0,  0,  9,  0,  0,  0, 10, 10,  0,  0,  4,  6,
+       0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  2,  6,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  6,  6,  0,  3,  0,  0,  0,
+       7,  0,  0,  0,  0,  7,  4,  0,  0,  0,  0,  0,  4,  0,
+       9,  0,  0,  3,  0,  0,  0,  7,  0,  4,  0,  0,  5,  6,
+       0,  0,  6,  3,  5,  4,  0,  0,  0,  0,  0,  6,  0,  5,
+       0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  5,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,
+       6,  0,  0,  6,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  8,  0,  0,  0,  6,  0,  0,  0,  0,  4,
+       0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0, 10,  0,  0,  6,  0,  6,  0,  0,  6,
+       0,  0, 18,  0,  6,  0, 20, 15,  0,  0,  4,  4,  0,  0,
+       0,  6,  0,  0,  0,  3,  0,  0,  0,  0,  0,  5,  4,  4,
+       0,  7,  0,  6,  0,  4,  0,  5,  0,  0,  0,  0,  5,  0,
+       0,  0,  4,  4,  0,  0,  0,  0,  4,  0,  4,  0, 11,  0,
+      20, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 10,  0,  0,  8,  0,  0,  0,  6,  0,  0,  0,
+       0,  4,  0,  0,  0,  0,  0,  4,  0,  0,  3,  0,  0,  6,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,
+       0,  0,  0,  0,  0,  0, 13,  0,  0,  9,  0,  0,  0,  5,
+       0,  0,  0,  5,  0,  3,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  3,  0,  0, 17,  0,  5,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  9,  0,  0,  0,  6,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  7,  0,  0,  0,  9,  0,  0,  0,  0,  0,  0, 14,  0,
+       0, 11,  0,  6,  0,  6,  0,  7,  5,  0,  0,  0,  6, 12,
+      12,  0,  0,  0,  0, 16,  0, 14,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  5,  0,  5,  0,  0,  0,  7,
+       0,  0,  5,  0,  0,  0,  0,  0,  0,  6,  0, 14,  0,  0,
+       0,  0,  0,  0,  4,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  5,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  5,  0,  0,  0,  0,  0,  0,
+       5,  0,  5,  0,  0,  0,  0,  0, 11,  6,  6,  3,  0,  0,
+       0,  0,  7,  0,  6,  0,  6,  6,  4,  0,  0,  0,  7,  0,
+       0,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  0,  5,  0,  0,  0,  6,  0,  0,  0,  0,
+       4,  4,  0,  0,  0,  0,  3,  3,  6,  0,  0,  0,  0,  0,
+       0,  8,  0,  0,  0,  0,  0,  6,  0,  0,  0,  4,  6,  0,
+       4,  4,  0,  0,  0,  0, 13,  0,  4,  0,  0,  0,  0,  4,
+       2,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  7,  0,
+       0,  0, 10,  0,  9,  0,  0,  4,  6,  0,  5,  0,  0,  0,
+      13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 10,  0,  0,  0,  0,  0,  0,  8,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0, 12,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0, 12,  0,
+       0,  0,  0,  0,  0,  0, 18,  0,  0,  4,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  7,  0,  0,  0,  0,  5,  0,  5,
+       0,  0,  0,  6,  0,  0,  5,  0,  0,  6,  0,  6,  0,  0,
+      13,  6,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  4,  0,  6,  0,  6,  7,  0,  0,  0,  0,  0,  0,  0,
+      14,  0,  6, 15,  0,  0,  7,  0,  3,  0,  3,  0,  0,  0,
+       9,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,
+       0,  4,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 12,  0,  0, 15,
+       0,  0,  0,  6,  0,  0,  6,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  7,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  2,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+       0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  3,  9,  4,  0,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  2, 15,  0,  0,
+       0,  5,  0,  5,  0,  4,  0,  0,  0,  0,  0,  0, 16,  0,
+       3,  3, 10,  0,  0,  0,  0,  0,  0,  0,  0,  4,  5,  4,
+       5,  4,  0,  0,  6,  0,  5,  4,  0,  5,  5,  3,  5,  0,
+       4,  0,  6,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  3,
+       0,  0,  0,  0,  0,  3,  0,  0,  6,  0,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  6,  8,  6,  0,  0,  0,  0,  0,  0,  0,  5, 16,  0,
+       5,  7,  0,  6,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,
+       0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  7,  0,  7,  0,  0,  5,  0,  0,
+       0,  0,  6,  0,  5,  4,  5,  0,  5,  5,  0,  0,  0,  0,
+       5,  2,  6,  4,  0,  5,  0,  0,  5,  0,  4,  0,  0,  0,
+       0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  9,  0,  0,  0,
+       0,  6,  0,  0,  0,  0,  3,  5,  0,  0,  0,  2,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,
+       0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  8,  0,  0,  0,  0,  6,  5,  0,  0,  4,
+       0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,
+       0,  4,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  4,  0,  4,  2,  6,  0,  6,  3,  3,  0,  0,
+       3,  0,  4,  0,  6,  0,  3,  0,  0,  6,  0,  5, 31,  0,
+       0,  0,  0,  0,  0,  0,  3,  6,  0,  0,  0,  0,  0,  0,
+       0,  4,  0,  0,  5,  0,  0,  0,  3,  0,  0,  0,  0,  6,
+       0,  8,  0,  5,  4,  0,  0,  0,  0,  3,  0,  0,  0,  0,
+       0,  0,  0,  3,  0,  0,  0,  0,  0,  5,  0,  0,  5,  0,
+       0,  0, 19,  0,  0,  0,  0, 24,  0,  0,  4,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  9,  0,  0,  0,  5,
+       0,  0,  0,  6,  0,  0,  0,  0, 14,  0,  0,  0,  0,  0,
+       0, 16,  5,  0,  0,  3,  4,  4,  0,  5,  4,  5,  0,  0,
+       0, 13,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  5,  0,  0,  0,  0,  0,  0,  6,  0,  3,
+       0,  7,  0, 10,  0,  0,  0,  0,  6,  0,  6,  0,  0, 13,
+       0,  0,  0,  5,  0,  8,  0,  6,  0,  6,  8,  6,  0,  0,
+       6,  6,  0, 10,  0,  8,  6,  6,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0, 11,  0,  0,  0,  6,  0,  0,  0,
+       0,  7,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       7,  0,  0,  0, 17,  6,  0,  0,  0,  0,  0, 16,  0,  0,
+       0,  0,  0,  0,  4,  0,  4,  0,  0,  0,  0,  0,  7,  0,
+      14,  7,  6,  0,  6,  0,  7,  0,  0,  0,  0,  0,  0,  0,
+       4,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6, 10,  4, 14,  0,  0,  0,  9,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 14,  0,  4,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  6,  3,  8,  4,  6,  6,  0,
+       5,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,
+       0,  6,  0,  4,  0,  2,  0, 20, 21,  0,  0,  2,  0,  0,
+       3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,
+       0,  0,  0,  0,  0,  6,  0,  0, 14,  4,  6, 17,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  6,  0,  0,  0,  5,  0,  0,
+       4,  6,  0,  2,  7,  0,  6,  5,  0,  8,  0,  0,  5,  0,
+       4,  0,  0,  0,  5,  0,  4, 15,  5,  0,  4,  6,  0,  0,
+       0,  0,  5,  5,  0,  0,  0,  0,  0,  0,  0, 17,  5,  0,
+       0,  0,  9,  6,  0,  0, 12,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  6,  0,  5,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  7,  5,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  4,  0,  0,  0,
+       0, 12,  0,  0,  0,  6,  0,  0,  0,  0, 10,  3,  0,  0,
+       0,  4,  0,  5,  0,  0,  0,  0,  0,  4,  0,  0,  4,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  7,  0,  0,
+       0,  0,  0,  0,  9,  0,  6,  0,  6,  0,  0,  0,  0, 19,
+       5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,
+       0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  3,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  5,  0,  6,  3,  6,
+       0,  0,  0,  0,  0,  0,  0,  4,  0,  4,  2,  0,  0,  0,
+       4,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  5,  0,  6,  0,  6,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  6,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0, 17,  0,
+       0,  7,  0,  0,  2,  6,  2,  0,  0,  0,  2,  0,  0,  0,
+       0,  3,  8,  0,  0,  3,  0,  5,  0,  5,  6,  0,  0,  0,
+       0, 18,  0,  0,  0,  0,  5,  0,  7,  0,  0,  9,  0,  0,
+       0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  4,  0,  4,  0,  0,  4,  0,  9,  0,  6,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  5,  0,  4,  0,
+       0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  5,  0,  5,  6,
+       0,  0,  0,  3,  3,  5,  0,  0,  0,  0,  6,  0,  0,  0,
+       6,  0,  9,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  4,
+       6, 13,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+      13,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,
+       0,  0,  5,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,
+       8,  6,  8,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0, 12,  0,  6,  0,  0,  0,  6,  0,  0,
+       0,  6,  4,  0,  0,  7,  6,  5,  0,  0,  6,  0,  5,  5,
+       5,  0,  0,  0,  9,  0,  0,  0,  0,  0,  5,  0,  6,  8,
+       0,  0,  6,  0,  5,  8,  0,  0,  0,  6,  0,  4,  0,  9,
+       0,  0,  0,  0,  4,  6,  4,  0,  0,  0,  0,  0,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  4,
+      11,  0,  0,  8,  9,  0,  0,  0,  0,  3,  5,  3,  0,  0,
+       0,  0,  6,  4,  0,  0,  0,  9,  4,  3,  0,  2,  0,  0,
+       0,  0,  0,  7,  5,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0, 14,  3,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0, 10,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  3,  0,  0,  0,
+       0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0, 10,  7,
+       5,  0,  6,  0,  6,  0,  3, 17,  0,  0,  0,  0,  0,  0,
+      20,  0, 14,  4,  0,  0,  0,  0,  0,  0, 19,  6,  6,  0,
+      10,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  6,  0,
+       0,  3,  0,  0,  0,  4,  5,  0,  0,  4,  0,  5,  0,  0,
+       0,  0,  0,  0,  7,  0,  4,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  0,  3,  0,  0,  0,  0,
+       0,  0,  7,  0,  3,  0,  4,  0,  3,  0,  4,  0,  0, 13,
+       0,  4,  0,  0,  0,  0,  0,  0,  0, 12,  0,  0,  0,  0,
+       0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       6,  0,  0,  0,  0,  0,  7,  0, 13,  0,  0, 15,  0,  0,
+       5,  9,  0,  0,  0,  6,  0,  6,  0,  0,  4,  6,  0,  0,
+       6,  4,  4,  0, 16,  0,  4,  0,  3,  0,  0, 11,  5, 15,
+       0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  7,  0,  0,  5,  0,  5,  4,  0,  0,  4,  0,
+      20,  4,  0,  0,  0,  0,  0,  5, 15,  4,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  5,  0,  0,  5,  0,
+       0,  0,  0,  0,  0,  0,  0,  5,  5,  0, 22,  0,  0,  7,
+       8,  0,  4,  0, 17,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  6,  7,  0,  0,  0,  0,  6,  0,  6,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  4,  0,  5,  0, 12, 15,  6,  0,
+      13,  0,  4,  0,  5,  4,  6,  0,  0,  0,  0,  4,  0,  0,
+       4,  3,  5,  0,  0,  0,  0,  0,  0,  4,  0,  4,  0,  0,
+       0,  0,  0,  0,  4,  0,  0,  9,  0,  0, 20,  0,  4, 10,
+       0,  0,  0,  0,  4,  0,  5,  0,  0,  8,  6,  0,  5,  4,
+       0,  0,  3,  0,  4,  0,  0,  6,  6,  0,  4,  0,  0,  0,
+       0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  4,  0,
+       0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 14,  0,  9,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0, 17,
+       0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,
+       0,  0,  0, 14,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0, 14,  0,  0,  0,  0,  0,  0,  5,  6,  0,  5,  0,  0,
+       0,  0,  0,  0,  5,  0,  8,  0,  0,  0,  4,  0,  0,  0,
+       0,  0, 16, 15,  4,  0,  0, 11,  0,  0,  0,  8,  0,  0,
+       0,  0,  0,  0,  0,  2,  0,  5,  0, 10,  0,  0,  5,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,
+       5,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  4,  0,  0,  0,  0,  0,  0,  0,  2,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  8,  6,  5,  4,  0,  0,  0,
+       0,  5,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  6,  0,
+       0,  0,  0,  2,  4,  5,  0,  0,  0,  8,  0,  0,  3,  0,
+       8,  0,  0,  4, 18,  0,  0,  0,  0,  4,  5,  0,  0,  0,
+      16,  0,  0,  0,  0,  7,  0,  2,  3,  5,  0,  0,  5,  0,
+       4,  4,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       8,  0, 14,  0,  0,  0,  0,  5,  0,  0,  6,  0,  6,  0,
+       5,  0,  5,  0,  5, 15,  0,  0,  8, 17, 12,  0,  0,  0,
+       0,  0,  6,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  0,  5,  0,  0, 20,  0,  0,  0,  0,  0,
+      11,  0,  5,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0, 13,
+       0,  0,  0,  0,  0,  6,  0,  6,  0,  6,  0,  6,  0,  5,
+       8,  0,  0,  0,  0,  0,  6, 14,  0,  0,  0,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,
+       0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  4,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  5,  5,  0,  0,  0,  0,  0,
+       0, 13,  0,  0,  0,  0,  0,  8,  4,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 19,  0,  0,  0,  0,  0,  0,  7,
+       0,  0, 16,  0, 14,  0, 18, 13,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  3,  0,  0,  0, 16,  0,  0,  0,  0,  0,
+       0, 14,  0,  0, 17,  0,  0,  0,  0,  0,  0,  0,  0,  3,
+       0,  0,  0,  0,  0,  0,  0, 13,  0,  0,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  5,  0,
+       4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  8, 17,  0,  0,  0,  5,  0,  0,  0,  8,  0,
+       0,  0,  0,  0,  0,  0,  9,  0, 15,  0,  5,  0,  5,  0,
+       0,  0,  0,  0,  0,  6,  5,  0,  0,  0,  0,  6,  4,  0,
+       0,  9,  0,  0,  0,  0,  0,  6,  0,  6,  0,  0,  8,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,
+       6,  2,  0,  0,  6,  0, 12,  6,  0,  0,  0, 16,  0,  0,
+       0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,
+       0,  0, 14, 22,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 10,  8,  0,  5,  0,  0,  6,
+       0,  0,  0,  6,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  5,  0,  0,  5,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  8,  0,  0,  0, 14,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  5,  0,  9,  0,
+       0,  0,  5,  0,  0,  0,  0,  4,  6,  0,  0,  0,  0,  0,
+       0,  8,  0,  0,  0,  0,  0,  9,  0,  0,  0,  0,  0,  0,
+       3,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0, 21,  5,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  6,  0,  6,  0,  0,  0,  0,  0,  3,  5,  0,
+       0,  5,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  2,  0,
+       9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,
+       5,  0,  0,  0,  0,  0,  0,  0,  0,  8,  5, 14,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       5,  6,  0,  0,  4,  0,  4,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0, 13,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  9,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 12,  0,  0,  0, 18, 10,  0,  0, 18,  0,  7,  0,  0,
+       0,  6,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  4,
+       0,  5,  0,  0,  0,  0,  6,  0,  0,  5,  0,  0,  4,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  4,  0,
+       0,  0,  5,  0, 12,  4, 12,  8,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  5,  0,  5,  0,
+       0,  0,  0,  0,  8,  0,  0,  0,  0,  4,  0,  0,  0,  0,
+       7,  5,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  4,
+       5,  0,  0,  0,  5,  6,  7,  7,  0,  0,  0,  0,  0,  0,
+       0,  6,  0,  8,  0,  0,  0,  0,  5,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 10, 16,  0,  0,  0,  0,  0,  0, 17,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,
+       4,  6,  0,  0,  0,  5,  0,  0,  0,  8,  0,  0,  0,  0,
+       0, 17,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  5,  0,  0,  0,  0, 17,  0,  5,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  8,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,
+       0,  0,  0,  0,  0,  0, 15,  0,  0,  0,  0,  0,  7,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  8,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  4,  0,
+       8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  0,  0,  0, 14,  0,  0,  0,
+       0,  0,  0,  0,  0,  8,  4,  0,  7,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  4,  0,  4,  6,  8,  0,  5,  0,
+       0,  4,  4,  0,  5,  4,  5,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  5,  0,  0, 18,  0,  5,  0,  0,  0, 19,  0,  0,
+       8,  0, 14,  0,  0,  0,  0, 13,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  0,  0,  5,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 11,  0,  5, 13,  0,  0,  0,  7,
+       0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  3,  0,  0,
+       4,  0,  6, 13,  0,  8,  0,  5,  0,  0,  0,  5,  0,  0,
+       7,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,  0,  0,
+       3,  0,  3,  0,  3,  0,  3,  3,  3,  4,  0,  4,  0,  3,
+       5,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  3,
+       4,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  5,
+       0, 18,  0,  0, 15,  7,  0,  3,  0,  0,  6,  5,  0,  5,
+       0,  3,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+      12,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,
+       0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,
+       0,  0,  0,  0,  0,  3,  3,  0,  0,  0,  0,  0,  0,  7,
+       0,  0,  0,  0,  3,  3,  0,  0,  0,  0,  0,  0,  5,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16,
+       7, 10,  0,  0,  0,  0,  0,  4,  0,  0,  9,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 11,  0,  4,  0,  0,  0,  0,  0,  0,  0,  5,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  6, 12,  0,  0,  0,  5,  6,  0,  0,  0,  0,
+       0,  5,  0,  0,  0,  5,  0,  0,  0,  0,  5,  0, 17,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  5,  0,  0,  0,  0,  6,  5,  0,  0,  0,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 13,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       4,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  5,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,
+       4, 15,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  6,  0,  9,  6,  0,  0,  0,
+       3,  0,  0,  0,  0,  0,  7,  0,  0, 20,  0,  5,  0,  0,
+       0,  0,  0,  0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  5,  0,  0,
+       0,  3,  0,  0,  6,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  3,  0,  0,  0,  0,  9,  0,  0,  0,  0,  0,  7,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 14,  0,  0,  0,  0,  5,  6,  0,  0,  0,  0,
+       0,  4,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,
+       0,  0,  5,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 14,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  5,  3,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  8,  0,  0,  5,  0,  0,  0,  0,  0,  0,
+       5,  0,  0,  0,  0,  0,  6,  8,  0,  0, 17,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 17,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  7,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  0, 13,  0,  0,  0,  0,  7,  0,  0,  3, 14,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,
+       0,  7,  5,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  4,  4,  4,  0,  0,  0,  0,  6, 11, 19,  0,
+       0,  5, 17,  0,  0,  0,  0,  0, 16,  5,  0,  0,  0,  0,
+      16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+      16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,
+       7,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  3,  0,  0,
+       0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       7,  0,  7,  8,  0,  0,  0,  0,  0, 13,  0, 16,  5,  4,
+       0,  0,  0,  6,  0,  0,  5,  0,  0,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 21,
+       9,  6,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  7,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  8,
+       9, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  6,  9,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       5,  7, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  3,  7,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  6,  0,  0,  0,
+       0,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 14,
+       0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  4, 10,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  3,  0,  0,  0,  0,  0, 10,  0, 10,  0,
+       0,  0, 21,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  5,  0,  0,  0,
+       0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 12,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  6,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0, 11,  0, 20,  0,  3,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 13,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,
+       0,  3,  0,  0,  0,  0,  5, 14,  5,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 21,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  3,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 13,  0,  0,  0,  0,  5,  0,
+       0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0,  4,  0,  0,  0,  0,  0,  0,  4,  0,  4,  0,  0,  0,
+      18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  8,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 10, 11,  5,  0,  0,
+       0,  0,  0,  0,  0, 13,  0,  0,  0,  0,  0,  0,  7,  0,
+      19,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 14,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 11,  0,  5,  0,
+       0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  6,  0,  0,  0,  0,  0, 16,  5,  0, 15,  0,
+       0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  3,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  3,  3,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 15,  0,  0,  0,  0,  0,  6,  0,  0,  0,  9,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,
+       0,  0,  0,  3,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  4,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 10,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  5, 11,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 12,  0,  0,  0,  0,  0,  0,  0,  0,  0, 11,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  7,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  5,  0,  0,  0,  4,  7,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  0,  4,  0,  0,  0,  5,  0,  0,  8,  0,  0,
+       0,  0,  0,  0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  9,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 15,  0,  0,  0,  0,  0,  4,
+       0,  0, 11,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 15,  0,  0, 18,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+      14,  0,  0, 18,  0,  0,  0,  4,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 15,  0,  0,
+       0,  0,  5,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,
+      13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,
+       0,  0,  0, 12,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 12,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 13,  0,  0, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 15,  0,  0, 18,  0,  0,  0,  7,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 15,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,
+       0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0, 11,  0,
+       0,  5,  0,  0,  0,  7,  0,  0,  0, 11,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  5,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       9,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0, 19,  0,  0,  0, 21, 16,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0, 10,  0,  5,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+      10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,
+       0, 13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0, 13,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 16,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  7,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  4,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 14,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  7,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  5,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 11,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0, 14,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  6,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       6,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0, 11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0, 14,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+       0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 15
+    };
+  static const struct html_ent wordlist[] =
+    {
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1502 "src/html/html_unescape.gperf"
+      {"rarr", 3, {226, 134, 146}},
+      {(char*)0},
+#line 834 "src/html/html_unescape.gperf"
+      {"larr", 3, {226, 134, 144}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 845 "src/html/html_unescape.gperf"
+      {"lat", 3, {226, 170, 171}},
+      {(char*)0}, {(char*)0},
+#line 1904 "src/html/html_unescape.gperf"
+      {"uarr", 3, {226, 134, 145}},
+      {(char*)0}, {(char*)0},
+#line 1236 "src/html/html_unescape.gperf"
+      {"npr", 3, {226, 138, 128}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0},
+#line 1511 "src/html/html_unescape.gperf"
+      {"rarrtl", 3, {226, 134, 163}},
+      {(char*)0},
+#line 842 "src/html/html_unescape.gperf"
+      {"larrtl", 3, {226, 134, 162}},
+#line 1602 "src/html/html_unescape.gperf"
+      {"roarr", 3, {226, 135, 190}},
+      {(char*)0},
+#line 964 "src/html/html_unescape.gperf"
+      {"loarr", 3, {226, 135, 189}},
+#line 1169 "src/html/html_unescape.gperf"
+      {"not", 2, {194, 172}},
+#line 1610 "src/html/html_unescape.gperf"
+      {"rpar", 1, {41}},
+#line 147 "src/html/html_unescape.gperf"
+      {"bot", 3, {226, 138, 165}},
+#line 990 "src/html/html_unescape.gperf"
+      {"lpar", 1, {40}},
+      {(char*)0},
+#line 1716 "src/html/html_unescape.gperf"
+      {"spar", 3, {226, 136, 165}},
+      {(char*)0},
+#line 946 "src/html/html_unescape.gperf"
+      {"ll", 3, {226, 137, 170}},
+#line 1927 "src/html/html_unescape.gperf"
+      {"uharr", 3, {226, 134, 190}},
+#line 506 "src/html/html_unescape.gperf"
+      {"epar", 3, {226, 139, 149}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 483 "src/html/html_unescape.gperf"
+      {"el", 3, {226, 170, 153}},
+      {(char*)0},
+#line 1608 "src/html/html_unescape.gperf"
+      {"rotimes", 3, {226, 168, 181}},
+      {(char*)0},
+#line 982 "src/html/html_unescape.gperf"
+      {"lotimes", 3, {226, 168, 180}},
+#line 1389 "src/html/html_unescape.gperf"
+      {"par", 3, {226, 136, 165}},
+      {(char*)0},
+#line 1133 "src/html/html_unescape.gperf"
+      {"nharr", 3, {226, 134, 174}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0},
+#line 1232 "src/html/html_unescape.gperf"
+      {"npar", 3, {226, 136, 166}},
+      {(char*)0}, {(char*)0},
+#line 1873 "src/html/html_unescape.gperf"
+      {"tprime", 3, {226, 128, 180}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 487 "src/html/html_unescape.gperf"
+      {"els", 3, {226, 170, 149}},
+#line 507 "src/html/html_unescape.gperf"
+      {"eparsl", 3, {226, 167, 163}},
+      {(char*)0},
+#line 501 "src/html/html_unescape.gperf"
+      {"ensp", 3, {226, 128, 130}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 194 "src/html/html_unescape.gperf"
+      {"bprime", 3, {226, 128, 181}},
+#line 956 "src/html/html_unescape.gperf"
+      {"lnap", 3, {226, 170, 137}},
+#line 138 "src/html/html_unescape.gperf"
+      {"blk14", 3, {226, 150, 145}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 137 "src/html/html_unescape.gperf"
+      {"blk12", 3, {226, 150, 146}},
+      {(char*)0},
+#line 139 "src/html/html_unescape.gperf"
+      {"blk34", 3, {226, 150, 147}},
+      {(char*)0},
+#line 1233 "src/html/html_unescape.gperf"
+      {"nparsl", 3, {226, 171, 189}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1144 "src/html/html_unescape.gperf"
+      {"nldr", 3, {226, 128, 165}},
+#line 1595 "src/html/html_unescape.gperf"
+      {"rlarr", 3, {226, 135, 132}},
+#line 1234 "src/html/html_unescape.gperf"
+      {"npart", 3, {226, 136, 130}},
+#line 945 "src/html/html_unescape.gperf"
+      {"llarr", 3, {226, 135, 135}},
+#line 1159 "src/html/html_unescape.gperf"
+      {"nlt", 3, {226, 137, 174}},
+#line 1697 "src/html/html_unescape.gperf"
+      {"slarr", 3, {226, 134, 144}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0},
+#line 1231 "src/html/html_unescape.gperf"
+      {"nparallel", 3, {226, 136, 166}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 1826 "src/html/html_unescape.gperf"
+      {"Tau", 2, {206, 164}},
+#line 1992 "src/html/html_unescape.gperf"
+      {"varr", 3, {226, 134, 149}},
+      {(char*)0},
+#line 1739 "src/html/html_unescape.gperf"
+      {"squ", 3, {226, 150, 161}},
+      {(char*)0}, {(char*)0},
+#line 1142 "src/html/html_unescape.gperf"
+      {"nlarr", 3, {226, 134, 154}},
+      {(char*)0}, {(char*)0},
+#line 1827 "src/html/html_unescape.gperf"
+      {"tau", 2, {207, 132}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 958 "src/html/html_unescape.gperf"
+      {"lne", 3, {226, 170, 135}},
+#line 1613 "src/html/html_unescape.gperf"
+      {"rrarr", 3, {226, 135, 137}},
+      {(char*)0},
+#line 992 "src/html/html_unescape.gperf"
+      {"lrarr", 3, {226, 135, 134}},
+      {(char*)0},
+#line 1741 "src/html/html_unescape.gperf"
+      {"srarr", 3, {226, 134, 146}},
+#line 1557 "src/html/html_unescape.gperf"
+      {"rharul", 3, {226, 165, 172}},
+      {(char*)0},
+#line 941 "src/html/html_unescape.gperf"
+      {"lharul", 3, {226, 165, 170}},
+#line 526 "src/html/html_unescape.gperf"
+      {"erarr", 3, {226, 165, 177}},
+      {(char*)0},
+#line 1434 "src/html/html_unescape.gperf"
+      {"pr", 3, {226, 137, 186}},
+#line 1556 "src/html/html_unescape.gperf"
+      {"rharu", 3, {226, 135, 128}},
+      {(char*)0},
+#line 940 "src/html/html_unescape.gperf"
+      {"lharu", 3, {226, 134, 188}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 1905 "src/html/html_unescape.gperf"
+      {"Uarr", 3, {226, 134, 159}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1129 "src/html/html_unescape.gperf"
+      {"nGt", 3, {226, 137, 171}},
+      {(char*)0},
+#line 141 "src/html/html_unescape.gperf"
+      {"bne", 1, {61}},
+#line 1242 "src/html/html_unescape.gperf"
+      {"nrarr", 3, {226, 134, 155}},
+      {(char*)0}, {(char*)0},
+#line 1819 "src/html/html_unescape.gperf"
+      {"swarr", 3, {226, 134, 153}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1498 "src/html/html_unescape.gperf"
+      {"rarrap", 3, {226, 165, 181}},
+      {(char*)0},
+#line 1967 "src/html/html_unescape.gperf"
+      {"upuparrows", 3, {226, 135, 136}},
+      {(char*)0},
+#line 345 "src/html/html_unescape.gperf"
+      {"Darr", 3, {226, 134, 161}},
+      {(char*)0}, {(char*)0},
+#line 1517 "src/html/html_unescape.gperf"
+      {"rbarr", 3, {226, 164, 141}},
+#line 398 "src/html/html_unescape.gperf"
+      {"Dot", 2, {194, 168}},
+#line 848 "src/html/html_unescape.gperf"
+      {"lbarr", 3, {226, 164, 140}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1307 "src/html/html_unescape.gperf"
+      {"nwarr", 3, {226, 134, 150}},
+      {(char*)0},
+#line 1704 "src/html/html_unescape.gperf"
+      {"smt", 3, {226, 170, 170}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 497 "src/html/html_unescape.gperf"
+      {"emsp14", 3, {226, 128, 133}},
+#line 1508 "src/html/html_unescape.gperf"
+      {"rarrpl", 3, {226, 165, 133}},
+      {(char*)0},
+#line 840 "src/html/html_unescape.gperf"
+      {"larrpl", 3, {226, 164, 185}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 1406 "src/html/html_unescape.gperf"
+      {"phmmat", 3, {226, 132, 179}},
+      {(char*)0},
+#line 496 "src/html/html_unescape.gperf"
+      {"emsp13", 3, {226, 128, 132}},
+      {(char*)0},
+#line 1014 "src/html/html_unescape.gperf"
+      {"LT", 1, {60}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 835 "src/html/html_unescape.gperf"
+      {"Larr", 3, {226, 134, 158}},
+#line 1525 "src/html/html_unescape.gperf"
+      {"rbrkslu", 3, {226, 166, 144}},
+      {(char*)0},
+#line 855 "src/html/html_unescape.gperf"
+      {"lbrkslu", 3, {226, 166, 141}},
+      {(char*)0},
+#line 1082 "src/html/html_unescape.gperf"
+      {"napos", 2, {197, 137}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1146 "src/html/html_unescape.gperf"
+      {"nle", 3, {226, 137, 176}},
+      {(char*)0},
+#line 1554 "src/html/html_unescape.gperf"
+      {"rHar", 3, {226, 165, 164}},
+      {(char*)0},
+#line 938 "src/html/html_unescape.gperf"
+      {"lHar", 3, {226, 165, 162}},
+#line 1477 "src/html/html_unescape.gperf"
+      {"qprime", 3, {226, 129, 151}},
+      {(char*)0},
+#line 829 "src/html/html_unescape.gperf"
+      {"lap", 3, {226, 170, 133}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0},
+#line 1087 "src/html/html_unescape.gperf"
+      {"nbsp", 2, {194, 160}},
+#line 1925 "src/html/html_unescape.gperf"
+      {"uHar", 3, {226, 165, 163}},
+#line 1868 "src/html/html_unescape.gperf"
+      {"top", 3, {226, 138, 164}},
+      {(char*)0},
+#line 2004 "src/html/html_unescape.gperf"
+      {"Vbar", 3, {226, 171, 171}},
+      {(char*)0}, {(char*)0},
+#line 947 "src/html/html_unescape.gperf"
+      {"Ll", 3, {226, 139, 152}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1432 "src/html/html_unescape.gperf"
+      {"prap", 3, {226, 170, 183}},
+      {(char*)0},
+#line 498 "src/html/html_unescape.gperf"
+      {"emsp", 3, {226, 128, 131}},
+      {(char*)0}, {(char*)0},
+#line 1079 "src/html/html_unescape.gperf"
+      {"nap", 3, {226, 137, 137}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+#line 976 "src/html/html_unescape.gperf"
+      {"looparrowleft", 3, {226, 134, 171}},
+      {(char*)0},
+#line 870 "src/html/html_unescape.gperf"
+      {"le", 3, {226, 137, 164}},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 1670 "src/html/html_unescape.gperf"
+      {"sharp", 3, {226, 153, 175}},
+      {(char*)0},
+#line 474 "src/html/html_unescape.gperf"
+      {"ee", 3, {226, 133, 135}},
+      {(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
+      {(char*)0}, {(char*)0}, {(char*)0},
+#line 914 "src/html/html_unescape.gperf"
+      {"les", 3, {226, 169, 189}},
+#line 745 "src/html/html_unescape.gperf"
+      {"in", 3, {226, 136, 136}},
+#line 1461 "src/html/html_unescape.gperf"
+      {"prop", 3, {226, 136, 157}},
+      {(char*)0},
+#line 1866 "src/html/html_unescape.gperf"
+      {"topbot", 3, {226, 140, 182}},
+      {(char*)0}, {(char*)0},
+#line 750 

<TRUNCATED>

[08/16] lucy-clownfish git commit: Add CommonMark source files

Posted by nw...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/inlines.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/inlines.c b/compiler/modules/CommonMark/src/inlines.c
new file mode 100644
index 0000000..9bc4e35
--- /dev/null
+++ b/compiler/modules/CommonMark/src/inlines.c
@@ -0,0 +1,993 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+
+#include "config.h"
+#include "node.h"
+#include "parser.h"
+#include "references.h"
+#include "cmark.h"
+#include "html/houdini.h"
+#include "utf8.h"
+#include "scanners.h"
+#include "inlines.h"
+
+
+// Macros for creating various kinds of simple.
+#define make_str(s) make_literal(CMARK_NODE_STRING, s)
+#define make_code(s) make_literal(CMARK_NODE_INLINE_CODE, s)
+#define make_raw_html(s) make_literal(CMARK_NODE_INLINE_HTML, s)
+#define make_linebreak() make_simple(CMARK_NODE_LINEBREAK)
+#define make_softbreak() make_simple(CMARK_NODE_SOFTBREAK)
+#define make_emph(contents) make_inlines(CMARK_NODE_EMPH, contents)
+#define make_strong(contents) make_inlines(CMARK_NODE_STRONG, contents)
+
+typedef struct DelimiterStack {
+	struct DelimiterStack *previous;
+	struct DelimiterStack *next;
+	cmark_node *first_inline;
+	int delim_count;
+	unsigned char delim_char;
+	int position;
+	bool can_open;
+	bool can_close;
+} delimiter_stack;
+
+typedef struct Subject {
+	chunk input;
+	int pos;
+	reference_map *refmap;
+	delimiter_stack *delimiters;
+} subject;
+
+static int parse_inline(subject* subj, cmark_node * parent);
+
+static void subject_from_buf(subject *e, strbuf *buffer, reference_map *refmap);
+static int subject_find_special_char(subject *subj);
+
+static unsigned char *cmark_clean_autolink(chunk *url, int is_email)
+{
+	strbuf buf = GH_BUF_INIT;
+
+	chunk_trim(url);
+
+	if (url->len == 0)
+		return NULL;
+
+	if (is_email)
+		strbuf_puts(&buf, "mailto:");
+
+	houdini_unescape_html_f(&buf, url->data, url->len);
+	return strbuf_detach(&buf);
+}
+
+static inline cmark_node *make_link(cmark_node *label, unsigned char *url, unsigned char *title)
+{
+	cmark_node* e = (cmark_node *)calloc(1, sizeof(*e));
+	if(e != NULL) {
+		e->type = CMARK_NODE_LINK;
+		e->first_child   = label;
+                e->last_child    = label;
+		e->as.link.url   = url;
+		e->as.link.title = title;
+		e->next = NULL;
+                label->parent = e;
+	}
+	return e;
+}
+
+static inline cmark_node* make_autolink(cmark_node* label, cmark_chunk url, int is_email)
+{
+	return make_link(label, cmark_clean_autolink(&url, is_email), NULL);
+}
+
+// Setting 'last_child' and the parent of 'contents' is up to the caller.
+static inline cmark_node* make_inlines(cmark_node_type t, cmark_node* contents)
+{
+	cmark_node * e = (cmark_node *)calloc(1, sizeof(*e));
+	if(e != NULL) {
+		e->type = t;
+		e->first_child = contents;
+		e->next = NULL;
+                e->prev = NULL;
+                e->parent = NULL;
+                // These fields aren't used for inlines:
+                e->start_line = 0;
+                e->start_column = 0;
+                e->end_line = 0;
+	}
+	return e;
+}
+
+// Create an inline with a literal string value.
+static inline cmark_node* make_literal(cmark_node_type t, cmark_chunk s)
+{
+	cmark_node * e = (cmark_node *)calloc(1, sizeof(*e));
+	if(e != NULL) {
+		e->type = t;
+		e->as.literal = s;
+		e->next = NULL;
+                e->prev = NULL;
+                e->parent = NULL;
+                e->first_child = NULL;
+                e->last_child = NULL;
+                // These fields aren't used for inlines:
+                e->start_line = 0;
+                e->start_column = 0;
+                e->end_line = 0;
+	}
+	return e;
+}
+
+// Create an inline with no value.
+static inline cmark_node* make_simple(cmark_node_type t)
+{
+	cmark_node* e = (cmark_node *)calloc(1, sizeof(*e));
+	if(e != NULL) {
+		e->type = t;
+		e->next = NULL;
+                e->prev = NULL;
+                e->parent = NULL;
+                e->first_child = NULL;
+                e->last_child = NULL;
+                // These fields aren't used for inlines:
+                e->start_line = 0;
+                e->start_column = 0;
+                e->end_line = 0;
+	}
+	return e;
+}
+
+static unsigned char *bufdup(const unsigned char *buf)
+{
+	unsigned char *new_buf = NULL;
+
+	if (buf) {
+		int len = strlen((char *)buf);
+		new_buf = (unsigned char *)calloc(len + 1, sizeof(*new_buf));
+		if(new_buf != NULL) {
+			memcpy(new_buf, buf, len + 1);
+		}
+	}
+
+	return new_buf;
+}
+
+static void subject_from_buf(subject *e, strbuf *buffer, reference_map *refmap)
+{
+	e->input.data = buffer->ptr;
+	e->input.len = buffer->size;
+	e->input.alloc = 0;
+	e->pos = 0;
+	e->refmap = refmap;
+	e->delimiters = NULL;
+
+	chunk_rtrim(&e->input);
+}
+
+static inline int isbacktick(int c)
+{
+	return (c == '`');
+}
+
+static inline unsigned char peek_char(subject *subj)
+{
+	return (subj->pos < subj->input.len) ? subj->input.data[subj->pos] : 0;
+}
+
+static inline unsigned char peek_at(subject *subj, int pos)
+{
+	return subj->input.data[pos];
+}
+
+// Return true if there are more characters in the subject.
+static inline int is_eof(subject* subj)
+{
+	return (subj->pos >= subj->input.len);
+}
+
+// Advance the subject.  Doesn't check for eof.
+#define advance(subj) (subj)->pos += 1
+
+// Take characters while a predicate holds, and return a string.
+static inline chunk take_while(subject* subj, int (*f)(int))
+{
+	unsigned char c;
+	int startpos = subj->pos;
+	int len = 0;
+
+	while ((c = peek_char(subj)) && (*f)(c)) {
+		advance(subj);
+		len++;
+	}
+
+	return chunk_dup(&subj->input, startpos, len);
+}
+
+// Try to process a backtick code span that began with a
+// span of ticks of length openticklength length (already
+// parsed).  Return 0 if you don't find matching closing
+// backticks, otherwise return the position in the subject
+// after the closing backticks.
+static int scan_to_closing_backticks(subject* subj, int openticklength)
+{
+	// read non backticks
+	unsigned char c;
+	while ((c = peek_char(subj)) && c != '`') {
+		advance(subj);
+	}
+	if (is_eof(subj)) {
+		return 0;  // did not find closing ticks, return 0
+	}
+	int numticks = 0;
+	while (peek_char(subj) == '`') {
+		advance(subj);
+		numticks++;
+	}
+	if (numticks != openticklength){
+		return(scan_to_closing_backticks(subj, openticklength));
+	}
+	return (subj->pos);
+}
+
+// Parse backtick code section or raw backticks, return an inline.
+// Assumes that the subject has a backtick at the current position.
+static cmark_node* handle_backticks(subject *subj)
+{
+	chunk openticks = take_while(subj, isbacktick);
+	int startpos = subj->pos;
+	int endpos = scan_to_closing_backticks(subj, openticks.len);
+
+	if (endpos == 0) { // not found
+		subj->pos = startpos; // rewind
+		return make_str(openticks);
+	} else {
+		strbuf buf = GH_BUF_INIT;
+
+		strbuf_set(&buf, subj->input.data + startpos, endpos - startpos - openticks.len);
+		strbuf_trim(&buf);
+		strbuf_normalize_whitespace(&buf);
+
+		return make_code(chunk_buf_detach(&buf));
+	}
+}
+
+// Scan ***, **, or * and return number scanned, or 0.
+// Advances position.
+static int scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close)
+{
+	int numdelims = 0;
+	unsigned char char_before, char_after;
+
+	char_before = subj->pos == 0 ? '\n' : peek_at(subj, subj->pos - 1);
+	while (peek_char(subj) == c) {
+		numdelims++;
+		advance(subj);
+	}
+	char_after = peek_char(subj);
+	*can_open = numdelims > 0 && !isspace(char_after);
+	*can_close = numdelims > 0 && !isspace(char_before);
+	if (c == '_') {
+		*can_open = *can_open && !isalnum(char_before);
+		*can_close = *can_close && !isalnum(char_after);
+	}
+	return numdelims;
+}
+
+/*
+static void print_delimiters(subject *subj)
+{
+	delimiter_stack *tempstack;
+	tempstack = subj->delimiters;
+	while (tempstack != NULL) {
+		printf("Item at %p: %d %d %d %d next(%p) prev(%p)\n",
+		       tempstack, tempstack->delim_count, tempstack->delim_char,
+		       tempstack->can_open, tempstack->can_close,
+		       tempstack->next, tempstack->previous);
+		tempstack = tempstack->previous;
+	}
+}
+*/
+
+static void remove_delimiter(subject *subj, delimiter_stack *stack)
+{
+	if (stack->previous != NULL) {
+		stack->previous->next = stack->next;
+	}
+	if (stack->next == NULL) {
+		// top of stack
+		subj->delimiters = stack->previous;
+	} else {
+		stack->next->previous = stack->previous;
+	}
+	free(stack);
+}
+
+static delimiter_stack * push_delimiter(subject *subj,
+					int numdelims,
+					unsigned char c,
+					bool can_open,
+					bool can_close,
+					cmark_node *inl_text)
+{
+	delimiter_stack *istack =
+		(delimiter_stack*)malloc(sizeof(delimiter_stack));
+	if (istack == NULL) {
+		return NULL;
+	}
+	istack->delim_count = numdelims;
+	istack->delim_char = c;
+	istack->can_open = can_open;
+	istack->can_close = can_close;
+	istack->first_inline = inl_text;
+	istack->previous = subj->delimiters;
+	istack->next = NULL;
+	if (istack->previous != NULL) {
+		istack->previous->next = istack;
+	}
+	istack->position = subj->pos;
+	return istack;
+}
+
+// Parse strong/emph or a fallback.
+// Assumes the subject has '_' or '*' at the current position.
+static cmark_node* handle_strong_emph(subject* subj, unsigned char c)
+{
+	int numdelims;
+	cmark_node * inl_text;
+	bool can_open, can_close;
+
+	numdelims = scan_delims(subj, c, &can_open, &can_close);
+
+	inl_text = make_str(chunk_dup(&subj->input, subj->pos - numdelims, numdelims));
+
+	if (can_open || can_close) {
+		subj->delimiters = push_delimiter(subj, numdelims, c, can_open, can_close,
+						  inl_text);
+	}
+
+	return inl_text;
+}
+
+static void process_emphasis(subject *subj, delimiter_stack *stack_bottom)
+{
+	delimiter_stack *closer = subj->delimiters;
+	delimiter_stack *opener, *tempstack, *nextstack;
+	int use_delims;
+	cmark_node *inl, *tmp, *emph;
+
+	// move back to first relevant delim.
+	while (closer != NULL && closer->previous != stack_bottom) {
+		closer = closer->previous;
+	}
+
+	// now move forward, looking for closers, and handling each
+	while (closer != NULL) {
+		if (closer->can_close &&
+		    (closer->delim_char == '*' || closer->delim_char == '_')) {
+			// Now look backwards for first matching opener:
+			opener = closer->previous;
+			while (opener != NULL && opener != stack_bottom) {
+				if (opener->delim_char == closer->delim_char &&
+				    opener->can_open) {
+					break;
+				}
+				opener = opener->previous;
+			}
+			if (opener != NULL && opener != stack_bottom) {
+				// calculate the actual number of delimeters used from this closer
+				if (closer->delim_count < 3 || opener->delim_count < 3) {
+					use_delims = closer->delim_count <= opener->delim_count ?
+						closer->delim_count : opener->delim_count;
+				} else { // closer and opener both have >= 3 delims
+					use_delims = closer->delim_count % 2 == 0 ? 2 : 1;
+				}
+
+				inl = opener->first_inline;
+
+				// remove used delimiters from stack elements and associated inlines.
+				opener->delim_count -= use_delims;
+				closer->delim_count -= use_delims;
+				inl->as.literal.len = opener->delim_count;
+				closer->first_inline->as.literal.len = closer->delim_count;
+
+				// free delimiters between opener and closer
+				tempstack = closer->previous;
+				while (tempstack != NULL && tempstack != opener) {
+					nextstack = tempstack->previous;
+					remove_delimiter(subj, tempstack);
+					tempstack = nextstack;
+				}
+
+				// create new emph or strong, and splice it in to our inlines
+				// between the opener and closer
+				emph = use_delims == 1 ? make_emph(inl->next) : make_strong(inl->next);
+				emph->next = closer->first_inline;
+				emph->prev = inl;
+				emph->parent = inl->parent;
+				inl->next = emph;
+
+				// if opener has 0 delims, remove it and its associated inline
+				if (opener->delim_count == 0) {
+					// replace empty opener inline with emph
+					chunk_free(&(inl->as.literal));
+					inl->type = emph->type;
+					inl->next = emph->next;
+					inl->first_child = emph->first_child;
+					free(emph);
+					emph = inl;
+					// remove opener from stack
+					remove_delimiter(subj, opener);
+				}
+
+				// fix tree structure
+				tmp = emph->first_child;
+				while (tmp->next != NULL && tmp->next != closer->first_inline) {
+					tmp->parent = emph;
+					tmp = tmp->next;
+				}
+				tmp->parent = emph;
+				if (tmp->next) {
+					tmp->next->prev = emph;
+				}
+				tmp->next = NULL;
+				emph->last_child = tmp;
+
+				// if closer has 0 delims, remove it and its associated inline
+				if (closer->delim_count == 0) {
+					// remove empty closer inline
+					tmp = closer->first_inline;
+					emph->next = tmp->next;
+					if (tmp->next) {
+						tmp->next->prev = emph;
+					}
+					cmark_node_unlink(tmp);
+					cmark_free_nodes(tmp);
+					// remove closer from stack
+					tempstack = closer->next;
+					remove_delimiter(subj, closer);
+					closer = tempstack;
+				}
+			} else {
+				closer = closer->next;
+			}
+		} else {
+			closer = closer->next;
+		}
+	}
+	// free all delimiters in stack down to stack_bottom:
+	while (subj->delimiters != stack_bottom) {
+		remove_delimiter(subj, subj->delimiters);
+	}
+}
+
+// Parse backslash-escape or just a backslash, returning an inline.
+static cmark_node* handle_backslash(subject *subj)
+{
+	advance(subj);
+	unsigned char nextchar = peek_char(subj);
+	if (ispunct(nextchar)) {  // only ascii symbols and newline can be escaped
+		advance(subj);
+		return make_str(chunk_dup(&subj->input, subj->pos - 1, 1));
+	} else if (nextchar == '\n') {
+		advance(subj);
+		return make_linebreak();
+	} else {
+		return make_str(chunk_literal("\\"));
+	}
+}
+
+// Parse an entity or a regular "&" string.
+// Assumes the subject has an '&' character at the current position.
+static cmark_node* handle_entity(subject* subj)
+{
+	strbuf ent = GH_BUF_INIT;
+	size_t len;
+
+	advance(subj);
+
+	len = houdini_unescape_ent(&ent,
+				   subj->input.data + subj->pos,
+				   subj->input.len - subj->pos
+				   );
+
+	if (len == 0)
+		return make_str(chunk_literal("&"));
+
+	subj->pos += len;
+	return make_str(chunk_buf_detach(&ent));
+}
+
+// Like make_str, but parses entities.
+// Returns an inline sequence consisting of str and entity elements.
+static cmark_node *make_str_with_entities(chunk *content)
+{
+	strbuf unescaped = GH_BUF_INIT;
+
+	if (houdini_unescape_html(&unescaped, content->data, (size_t)content->len)) {
+		return make_str(chunk_buf_detach(&unescaped));
+	} else {
+		return make_str(*content);
+	}
+}
+
+// Clean a URL: remove surrounding whitespace and surrounding <>,
+// and remove \ that escape punctuation.
+unsigned char *clean_url(chunk *url)
+{
+	strbuf buf = GH_BUF_INIT;
+
+	chunk_trim(url);
+
+	if (url->len == 0)
+		return NULL;
+
+	if (url->data[0] == '<' && url->data[url->len - 1] == '>') {
+		houdini_unescape_html_f(&buf, url->data + 1, url->len - 2);
+	} else {
+		houdini_unescape_html_f(&buf, url->data, url->len);
+	}
+
+	strbuf_unescape(&buf);
+	return strbuf_detach(&buf);
+}
+
+unsigned char *clean_title(chunk *title)
+{
+       strbuf buf = GH_BUF_INIT;
+       unsigned char first, last;
+
+       if (title->len == 0)
+               return NULL;
+
+       first = title->data[0];
+       last = title->data[title->len - 1];
+
+       // remove surrounding quotes if any:
+       if ((first == '\'' && last == '\'') ||
+           (first == '(' && last == ')') ||
+           (first == '"' && last == '"')) {
+               houdini_unescape_html_f(&buf, title->data + 1, title->len - 2);
+       } else {
+               houdini_unescape_html_f(&buf, title->data, title->len);
+       }
+
+       strbuf_unescape(&buf);
+       return strbuf_detach(&buf);
+}
+
+// Parse an autolink or HTML tag.
+// Assumes the subject has a '<' character at the current position.
+static cmark_node* handle_pointy_brace(subject* subj)
+{
+	int matchlen = 0;
+	chunk contents;
+
+	advance(subj);  // advance past first <
+
+	// first try to match a URL autolink
+	matchlen = scan_autolink_uri(&subj->input, subj->pos);
+	if (matchlen > 0) {
+		contents = chunk_dup(&subj->input, subj->pos, matchlen - 1);
+		subj->pos += matchlen;
+
+		return make_autolink(
+				     make_str_with_entities(&contents),
+				     contents, 0
+				     );
+	}
+
+	// next try to match an email autolink
+	matchlen = scan_autolink_email(&subj->input, subj->pos);
+	if (matchlen > 0) {
+		contents = chunk_dup(&subj->input, subj->pos, matchlen - 1);
+		subj->pos += matchlen;
+
+		return make_autolink(
+				     make_str_with_entities(&contents),
+				     contents, 1
+				     );
+	}
+
+	// finally, try to match an html tag
+	matchlen = scan_html_tag(&subj->input, subj->pos);
+	if (matchlen > 0) {
+		contents = chunk_dup(&subj->input, subj->pos - 1, matchlen + 1);
+		subj->pos += matchlen;
+		return make_raw_html(contents);
+	}
+
+	// if nothing matches, just return the opening <:
+	return make_str(chunk_literal("<"));
+}
+
+// Parse a link label.  Returns 1 if successful.
+// Note:  unescaped brackets are not allowed in labels.
+// The label begins with `[` and ends with the first `]` character
+// encountered.  Backticks in labels do not start code spans.
+static int link_label(subject* subj, chunk *raw_label)
+{
+	int startpos = subj->pos;
+	int length = 0;
+
+	advance(subj);  // advance past [
+	unsigned char c;
+	while ((c = peek_char(subj)) && c != '[' && c != ']') {
+		if (c == '\\') {
+			advance(subj);
+			length++;
+			if (ispunct(peek_char(subj))) {
+				advance(subj);
+				length++;
+			}
+		} else {
+			advance(subj);
+			length++;
+		}
+		if (length > MAX_LINK_LABEL_LENGTH) {
+			goto noMatch;
+		}
+	}
+
+	if (c == ']') { // match found
+		*raw_label = chunk_dup(&subj->input, startpos + 1, subj->pos - (startpos + 1));
+		advance(subj);  // advance past ]
+		return 1;
+	}
+
+ noMatch:
+	subj->pos = startpos; // rewind
+	return 0;
+
+}
+
+// Return a link, an image, or a literal close bracket.
+static cmark_node* handle_close_bracket(subject* subj, cmark_node *parent)
+{
+	int initial_pos;
+	int starturl, endurl, starttitle, endtitle, endall;
+	int n;
+	int sps;
+	reference *ref;
+	bool is_image = false;
+	chunk urlchunk, titlechunk;
+	unsigned char *url, *title;
+	delimiter_stack *opener;
+	delimiter_stack *tempstack;
+	cmark_node *link_text;
+	cmark_node *inl;
+	chunk raw_label;
+	int found_label;
+
+	advance(subj);  // advance past ]
+	initial_pos = subj->pos;
+
+	// look through stack of delimiters for a [ or !
+	opener = subj->delimiters;
+	while (opener) {
+		if (opener->delim_char == '[' || opener->delim_char == '!') {
+			break;
+		}
+		opener = opener->previous;
+	}
+
+	if (opener == NULL) {
+		return make_str(chunk_literal("]"));
+	}
+
+	// If we got here, we matched a potential link/image text.
+	is_image = opener->delim_char == '!';
+	link_text = opener->first_inline->next;
+
+	// Now we check to see if it's a link/image.
+
+	// First, look for an inline link.
+	if (peek_char(subj) == '(' &&
+	    ((sps = scan_spacechars(&subj->input, subj->pos + 1)) > -1) &&
+	    ((n = scan_link_url(&subj->input, subj->pos + 1 + sps)) > -1)) {
+
+		// try to parse an explicit link:
+		starturl = subj->pos + 1 + sps; // after (
+		endurl = starturl + n;
+		starttitle = endurl + scan_spacechars(&subj->input, endurl);
+
+		// ensure there are spaces btw url and title
+		endtitle = (starttitle == endurl) ? starttitle :
+			starttitle + scan_link_title(&subj->input, starttitle);
+
+		endall = endtitle + scan_spacechars(&subj->input, endtitle);
+
+		if (peek_at(subj, endall) == ')') {
+			subj->pos = endall + 1;
+
+			urlchunk = chunk_dup(&subj->input, starturl, endurl - starturl);
+			titlechunk = chunk_dup(&subj->input, starttitle, endtitle - starttitle);
+			url = clean_url(&urlchunk);
+			title = clean_title(&titlechunk);
+			chunk_free(&urlchunk);
+			chunk_free(&titlechunk);
+			goto match;
+
+		} else {
+			goto noMatch;
+		}
+	}
+
+	// Next, look for a following [link label] that matches in refmap.
+	// skip spaces
+	subj->pos = subj->pos + scan_spacechars(&subj->input, subj->pos);
+	raw_label = chunk_literal("");
+	found_label = link_label(subj, &raw_label);
+	if (!found_label || raw_label.len == 0) {
+		chunk_free(&raw_label);
+		raw_label = chunk_dup(&subj->input, opener->position,
+				      initial_pos - opener->position - 1);
+	}
+
+	if (!found_label) {
+		// If we have a shortcut reference link, back up
+		// to before the spacse we skipped.
+		subj->pos = initial_pos;
+	}
+
+	ref = reference_lookup(subj->refmap, &raw_label);
+	chunk_free(&raw_label);
+
+	if (ref != NULL) { // found
+		url = bufdup(ref->url);
+		title = bufdup(ref->title);
+		goto match;
+	} else {
+		goto noMatch;
+	}
+
+noMatch:
+	// If we fall through to here, it means we didn't match a link:
+	remove_delimiter(subj, opener);  // remove this opener from delimiter stack
+	subj->pos = initial_pos;
+	return make_str(chunk_literal("]"));
+
+match:
+	inl = opener->first_inline;
+	inl->type = is_image ? NODE_IMAGE : NODE_LINK;
+	chunk_free(&inl->as.literal);
+	inl->first_child = link_text;
+	process_emphasis(subj, opener->previous);
+	inl->as.link.url   = url;
+	inl->as.link.title = title;
+	inl->next = NULL;
+	if (link_text) {
+		cmark_node *tmp;
+		link_text->prev = NULL;
+		for (tmp = link_text; tmp->next != NULL; tmp = tmp->next) {
+			tmp->parent = inl;
+		}
+		tmp->parent = inl;
+		inl->last_child = tmp;
+	}
+	parent->last_child = inl;
+
+	// process_emphasis will remove this delimiter and all later ones.
+	// Now, if we have a link, we also want to remove earlier link
+        // delimiters. (This code can be removed if we decide to allow links
+	// inside links.)
+	if (!is_image) {
+		opener = subj->delimiters;
+		while (opener != NULL) {
+			tempstack = opener->previous;
+			if (opener->delim_char == '[') {
+				remove_delimiter(subj, opener);
+			}
+			opener = tempstack;
+		}
+	}
+
+	return NULL;
+}
+
+// Parse a hard or soft linebreak, returning an inline.
+// Assumes the subject has a newline at the current position.
+static cmark_node* handle_newline(subject *subj)
+{
+	int nlpos = subj->pos;
+	// skip over newline
+	advance(subj);
+	// skip spaces at beginning of line
+	while (peek_char(subj) == ' ') {
+		advance(subj);
+	}
+	if (nlpos > 1 &&
+	    peek_at(subj, nlpos - 1) == ' ' &&
+	    peek_at(subj, nlpos - 2) == ' ') {
+		return make_linebreak();
+	} else {
+		return make_softbreak();
+	}
+}
+
+static int subject_find_special_char(subject *subj)
+{
+	// "\n\\`&_*[]<!"
+	static const int8_t SPECIAL_CHARS[256] = {
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1,
+		1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+	int n = subj->pos + 1;
+
+	while (n < subj->input.len) {
+		if (SPECIAL_CHARS[subj->input.data[n]])
+			return n;
+		n++;
+	}
+
+	return subj->input.len;
+}
+
+// Parse an inline, advancing subject, and add it as a child of parent.
+// Return 0 if no inline can be parsed, 1 otherwise.
+static int parse_inline(subject* subj, cmark_node * parent)
+{
+	cmark_node* new_inl = NULL;
+	chunk contents;
+	unsigned char c;
+	int endpos;
+	c = peek_char(subj);
+	if (c == 0) {
+		return 0;
+	}
+	switch(c){
+	case '\n':
+		new_inl = handle_newline(subj);
+		break;
+	case '`':
+		new_inl = handle_backticks(subj);
+		break;
+	case '\\':
+		new_inl = handle_backslash(subj);
+		break;
+	case '&':
+		new_inl = handle_entity(subj);
+		break;
+	case '<':
+		new_inl = handle_pointy_brace(subj);
+		break;
+	case '*':
+	case '_':
+		new_inl = handle_strong_emph(subj, c);
+		break;
+	case '[':
+		advance(subj);
+		new_inl = make_str(chunk_literal("["));
+		subj->delimiters = push_delimiter(subj, 1, '[', true, false, new_inl);
+		break;
+	case ']':
+		new_inl = handle_close_bracket(subj, parent);
+		break;
+	case '!':
+		advance(subj);
+		if (peek_char(subj) == '[') {
+			advance(subj);
+			new_inl = make_str(chunk_literal("!["));
+			subj->delimiters = push_delimiter(subj, 1, '!', false, true, new_inl);
+		} else {
+			new_inl = make_str(chunk_literal("!"));
+		}
+		break;
+	default:
+		endpos = subject_find_special_char(subj);
+		contents = chunk_dup(&subj->input, subj->pos, endpos - subj->pos);
+		subj->pos = endpos;
+
+		// if we're at a newline, strip trailing spaces.
+		if (peek_char(subj) == '\n') {
+			chunk_rtrim(&contents);
+		}
+
+		new_inl = make_str(contents);
+	}
+	if (new_inl != NULL) {
+		cmark_node_append_child(parent, new_inl);
+	}
+
+	return 1;
+}
+
+// Parse inlines from parent's string_content, adding as children of parent.
+extern void cmark_parse_inlines(cmark_node* parent, cmark_reference_map *refmap)
+{
+	subject subj;
+	subject_from_buf(&subj, &parent->string_content, refmap);
+
+	while (!is_eof(&subj) && parse_inline(&subj, parent)) ;
+
+	process_emphasis(&subj, NULL);
+}
+
+// Parse zero or more space characters, including at most one newline.
+static void spnl(subject* subj)
+{
+	bool seen_newline = false;
+	while (peek_char(subj) == ' ' ||
+	       (!seen_newline &&
+		(seen_newline = peek_char(subj) == '\n'))) {
+		advance(subj);
+	}
+}
+
+// Parse reference.  Assumes string begins with '[' character.
+// Modify refmap if a reference is encountered.
+// Return 0 if no reference found, otherwise position of subject
+// after reference is parsed.
+int parse_reference_inline(strbuf *input, reference_map *refmap)
+{
+	subject subj;
+
+	chunk lab;
+	chunk url;
+	chunk title;
+
+	int matchlen = 0;
+	int beforetitle;
+
+	subject_from_buf(&subj, input, NULL);
+
+	// parse label:
+	if (!link_label(&subj, &lab))
+		return 0;
+
+	// colon:
+	if (peek_char(&subj) == ':') {
+		advance(&subj);
+	} else {
+		return 0;
+	}
+
+	// parse link url:
+	spnl(&subj);
+	matchlen = scan_link_url(&subj.input, subj.pos);
+	if (matchlen) {
+		url = chunk_dup(&subj.input, subj.pos, matchlen);
+		subj.pos += matchlen;
+	} else {
+		return 0;
+	}
+
+	// parse optional link_title
+	beforetitle = subj.pos;
+	spnl(&subj);
+	matchlen = scan_link_title(&subj.input, subj.pos);
+	if (matchlen) {
+		title = chunk_dup(&subj.input, subj.pos, matchlen);
+		subj.pos += matchlen;
+	} else {
+		subj.pos = beforetitle;
+		title = chunk_literal("");
+	}
+	// parse final spaces and newline:
+	while (peek_char(&subj) == ' ') {
+		advance(&subj);
+	}
+	if (peek_char(&subj) == '\n') {
+		advance(&subj);
+	} else if (peek_char(&subj) != 0) {
+		return 0;
+	}
+	// insert reference into refmap
+	reference_create(refmap, &lab, &url, &title);
+	return subj.pos;
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/inlines.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/inlines.h b/compiler/modules/CommonMark/src/inlines.h
new file mode 100644
index 0000000..92b3b7a
--- /dev/null
+++ b/compiler/modules/CommonMark/src/inlines.h
@@ -0,0 +1,26 @@
+#ifndef CMARK_INLINES_H
+#define CMARK_INLINES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+unsigned char *cmark_clean_url(cmark_chunk *url);
+unsigned char *cmark_clean_title(cmark_chunk *title);
+
+void cmark_parse_inlines(cmark_node* parent, cmark_reference_map *refmap);
+
+int cmark_parse_reference_inline(cmark_strbuf *input, cmark_reference_map *refmap);
+
+#ifndef CMARK_NO_SHORT_NAMES
+  #define parse_inlines             cmark_parse_inlines
+  #define parse_reference_inline    cmark_parse_reference_inline
+  #define clean_url                 cmark_clean_url
+  #define clean_title               cmark_clean_title
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/node.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/node.c b/compiler/modules/CommonMark/src/node.c
new file mode 100644
index 0000000..35e19d2
--- /dev/null
+++ b/compiler/modules/CommonMark/src/node.c
@@ -0,0 +1,657 @@
+#include <stdlib.h>
+#include <string.h>
+
+#include "config.h"
+#include "node.h"
+
+static void
+S_node_unlink(cmark_node *node);
+
+cmark_node*
+cmark_node_new(cmark_node_type type) {
+	cmark_node *node = (cmark_node *)calloc(1, sizeof(*node));
+	node->type = type;
+
+	switch (node->type) {
+	case CMARK_NODE_ATX_HEADER:
+	case CMARK_NODE_SETEXT_HEADER:
+		node->as.header.level = 1;
+		break;
+
+	case CMARK_NODE_LIST: {
+		cmark_list *list = &node->as.list;
+		list->list_type = CMARK_BULLET_LIST;
+		list->start     = 1;
+		list->tight     = false;
+		break;
+	}
+
+	default:
+		break;
+	}
+
+	return node;
+}
+
+void
+cmark_node_destroy(cmark_node *node) {
+	S_node_unlink(node);
+	node->next = NULL;
+	cmark_free_nodes(node);
+}
+
+cmark_node_type
+cmark_node_get_type(cmark_node *node)
+{
+	return node->type;
+}
+
+static const char*
+S_type_string(cmark_node *node)
+{
+	switch (node->type) {
+	case CMARK_NODE_DOCUMENT:      return "DOCUMENT";
+	case CMARK_NODE_BLOCK_QUOTE:   return "BLOCK_QUOTE";
+	case CMARK_NODE_LIST:          return "LIST";
+	case CMARK_NODE_LIST_ITEM:     return "LIST_ITEM";
+	case CMARK_NODE_FENCED_CODE:   return "FENCED_CODE";
+	case CMARK_NODE_INDENTED_CODE: return "INDENTED_CODE";
+	case CMARK_NODE_HTML:          return "HTML";
+	case CMARK_NODE_PARAGRAPH:     return "PARAGRAPH";
+	case CMARK_NODE_ATX_HEADER:    return "ATX_HEADER";
+	case CMARK_NODE_SETEXT_HEADER: return "SETEXT_HEADER";
+	case CMARK_NODE_HRULE:         return "HRULE";
+	case CMARK_NODE_REFERENCE_DEF: return "REFERENCE_DEF";
+	case CMARK_NODE_STRING:        return "STRING";
+	case CMARK_NODE_SOFTBREAK:     return "SOFTBREAK";
+	case CMARK_NODE_LINEBREAK:     return "LINEBREAK";
+	case CMARK_NODE_INLINE_CODE:   return "INLINE_CODE";
+	case CMARK_NODE_INLINE_HTML:   return "INLINE_HTML";
+	case CMARK_NODE_EMPH:          return "EMPH";
+	case CMARK_NODE_STRONG:        return "STRONG";
+	case CMARK_NODE_LINK:          return "LINK";
+	case CMARK_NODE_IMAGE:         return "IMAGE";
+	}
+
+	return "<unknown>";
+}
+
+cmark_node*
+cmark_node_next(cmark_node *node)
+{
+	return node->next;
+}
+
+cmark_node*
+cmark_node_previous(cmark_node *node)
+{
+	return node->prev;
+}
+
+cmark_node*
+cmark_node_parent(cmark_node *node)
+{
+	return node->parent;
+}
+
+cmark_node*
+cmark_node_first_child(cmark_node *node)
+{
+	return node->first_child;
+}
+
+cmark_node*
+cmark_node_last_child(cmark_node *node)
+{
+	return node->last_child;
+}
+
+static char*
+S_strdup(const char *str) {
+	size_t size = strlen(str) + 1;
+	char *dup = (char *)malloc(size);
+	memcpy(dup, str, size);
+	return dup;
+}
+
+const char*
+cmark_node_get_string_content(cmark_node *node) {
+	switch (node->type) {
+	case NODE_INDENTED_CODE:
+	case NODE_FENCED_CODE:
+	case NODE_HTML:
+		return cmark_strbuf_cstr(&node->string_content);
+
+	case NODE_STRING:
+	case NODE_INLINE_HTML:
+	case NODE_INLINE_CODE:
+		return cmark_chunk_to_cstr(&node->as.literal);
+
+	default:
+		break;
+	}
+
+	return NULL;
+}
+
+int
+cmark_node_set_string_content(cmark_node *node, const char *content) {
+	switch (node->type) {
+	case NODE_INDENTED_CODE:
+	case NODE_FENCED_CODE:
+	case NODE_HTML:
+		cmark_strbuf_sets(&node->string_content, content);
+		return 1;
+
+	case NODE_STRING:
+	case NODE_INLINE_HTML:
+	case NODE_INLINE_CODE:
+		cmark_chunk_set_cstr(&node->as.literal, content);
+		return 1;
+
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+int
+cmark_node_get_header_level(cmark_node *node) {
+	switch (node->type) {
+	case CMARK_NODE_ATX_HEADER:
+	case CMARK_NODE_SETEXT_HEADER:
+		return node->as.header.level;
+
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+int
+cmark_node_set_header_level(cmark_node *node, int level) {
+	if (level < 1 || level > 6) {
+		return 0;
+	}
+
+	switch (node->type) {
+	case CMARK_NODE_ATX_HEADER:
+	case CMARK_NODE_SETEXT_HEADER:
+		node->as.header.level = level;
+		return 1;
+
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+cmark_list_type
+cmark_node_get_list_type(cmark_node *node) {
+	if (node->type == CMARK_NODE_LIST) {
+		return node->as.list.list_type;
+	}
+	else {
+		return CMARK_NO_LIST;
+	}
+}
+
+int
+cmark_node_set_list_type(cmark_node *node, cmark_list_type type) {
+	if (!(type == CMARK_BULLET_LIST || type == CMARK_ORDERED_LIST)) {
+		return 0;
+	}
+
+	if (node->type == CMARK_NODE_LIST) {
+		node->as.list.list_type = type;
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+
+int
+cmark_node_get_list_start(cmark_node *node) {
+	if (node->type == CMARK_NODE_LIST) {
+		return node->as.list.start;
+	}
+	else {
+		return 0;
+	}
+}
+
+int
+cmark_node_set_list_start(cmark_node *node, int start) {
+	if (start < 0) {
+		return 0;
+	}
+
+	if (node->type == CMARK_NODE_LIST) {
+		node->as.list.start = start;
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+
+int
+cmark_node_get_list_tight(cmark_node *node) {
+	if (node->type == CMARK_NODE_LIST) {
+		return node->as.list.tight;
+	}
+	else {
+		return 0;
+	}
+}
+
+int
+cmark_node_set_list_tight(cmark_node *node, int tight) {
+	if (node->type == CMARK_NODE_LIST) {
+		node->as.list.tight = tight;
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+
+const char*
+cmark_node_get_fence_info(cmark_node *node) {
+	if (node->type == NODE_FENCED_CODE) {
+		return cmark_strbuf_cstr(&node->as.code.info);
+	}
+	else {
+		return NULL;
+	}
+}
+
+int
+cmark_node_set_fence_info(cmark_node *node, const char *info) {
+	if (node->type == NODE_FENCED_CODE) {
+		cmark_strbuf_sets(&node->as.code.info, info);
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+
+const char*
+cmark_node_get_url(cmark_node *node) {
+	switch (node->type) {
+	case NODE_LINK:
+	case NODE_IMAGE:
+		return (char *)node->as.link.url;
+	default:
+		break;
+	}
+
+	return NULL;
+}
+
+int
+cmark_node_set_url(cmark_node *node, const char *url) {
+	switch (node->type) {
+	case NODE_LINK:
+	case NODE_IMAGE:
+		free(node->as.link.url);
+		node->as.link.url = (unsigned char *)S_strdup(url);
+		return 1;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+const char*
+cmark_node_get_title(cmark_node *node) {
+	switch (node->type) {
+	case NODE_LINK:
+	case NODE_IMAGE:
+		return (char *)node->as.link.title;
+	default:
+		break;
+	}
+
+	return NULL;
+}
+
+int
+cmark_node_set_title(cmark_node *node, const char *title) {
+	switch (node->type) {
+	case NODE_LINK:
+	case NODE_IMAGE:
+		free(node->as.link.title);
+		node->as.link.title = (unsigned char *)S_strdup(title);
+		return 1;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
+int
+cmark_node_get_start_line(cmark_node *node) {
+	return node->start_line;
+}
+
+int
+cmark_node_get_start_column(cmark_node *node) {
+	return node->start_column;
+}
+
+int
+cmark_node_get_end_line(cmark_node *node) {
+	return node->end_line;
+}
+
+static inline bool
+S_is_block(cmark_node *node) {
+	return node->type >= CMARK_NODE_FIRST_BLOCK
+	       && node->type <= CMARK_NODE_LAST_BLOCK;
+}
+
+static inline bool
+S_is_inline(cmark_node *node) {
+	return node->type >= CMARK_NODE_FIRST_INLINE
+	       && node->type <= CMARK_NODE_LAST_INLINE;
+}
+
+static bool
+S_can_contain(cmark_node *node, cmark_node *child)
+{
+	cmark_node *cur;
+
+	// Verify that child is not an ancestor of node or equal to node.
+	cur = node;
+	do {
+		if (cur == child) {
+			return false;
+		}
+		cur = cur->parent;
+	} while (cur != NULL);
+
+	if (child->type == CMARK_NODE_DOCUMENT) {
+		return false;
+	}
+
+	switch (node->type) {
+	case CMARK_NODE_DOCUMENT:
+	case CMARK_NODE_BLOCK_QUOTE:
+	case CMARK_NODE_LIST_ITEM:
+		return S_is_block(child)
+		       && child->type != CMARK_NODE_LIST_ITEM;
+
+	case CMARK_NODE_LIST:
+		return child->type == CMARK_NODE_LIST_ITEM;
+
+	case CMARK_NODE_PARAGRAPH:
+	case CMARK_NODE_ATX_HEADER:
+	case CMARK_NODE_SETEXT_HEADER:
+	case CMARK_NODE_EMPH:
+	case CMARK_NODE_STRONG:
+	case CMARK_NODE_LINK:
+	case CMARK_NODE_IMAGE:
+		return S_is_inline(child);
+
+	default:
+		break;
+	}
+
+	return false;
+}
+
+// Unlink a node without adjusting its next, prev, and parent pointers.
+static void
+S_node_unlink(cmark_node *node)
+{
+	if (node->prev) {
+		node->prev->next = node->next;
+	}
+	if (node->next) {
+		node->next->prev = node->prev;
+	}
+
+	// Adjust first_child and last_child of parent.
+	cmark_node *parent = node->parent;
+	if (parent) {
+		if (parent->first_child == node) {
+			parent->first_child = node->next;
+		}
+		if (parent->last_child == node) {
+			parent->last_child = node->prev;
+		}
+	}
+}
+
+void
+cmark_node_unlink(cmark_node *node) {
+	S_node_unlink(node);
+
+	node->next   = NULL;
+	node->prev   = NULL;
+	node->parent = NULL;
+
+}
+
+int
+cmark_node_insert_before(cmark_node *node, cmark_node *sibling)
+{
+	if (!S_can_contain(node->parent, sibling)) {
+		return 0;
+	}
+
+	S_node_unlink(sibling);
+
+	cmark_node *old_prev = node->prev;
+
+	// Insert 'sibling' between 'old_prev' and 'node'.
+	if (old_prev) {
+		old_prev->next = sibling;
+	}
+	sibling->prev = old_prev;
+	sibling->next = node;
+	node->prev    = sibling;
+
+	// Set new parent.
+	cmark_node *parent = node->parent;
+	sibling->parent = parent;
+
+	// Adjust first_child of parent if inserted as first child.
+	if (parent && !old_prev) {
+		parent->first_child = sibling;
+	}
+
+	return 1;
+}
+
+int
+cmark_node_insert_after(cmark_node *node, cmark_node *sibling)
+{
+	if (!S_can_contain(node->parent, sibling)) {
+		return 0;
+	}
+
+	S_node_unlink(sibling);
+
+	cmark_node *old_next = node->next;
+
+	// Insert 'sibling' between 'node' and 'old_next'.
+	if (old_next) {
+		old_next->prev = sibling;
+	}
+	sibling->next = old_next;
+	sibling->prev = node;
+	node->next    = sibling;
+
+	// Set new parent.
+	cmark_node *parent = node->parent;
+	sibling->parent = parent;
+
+	// Adjust last_child of parent if inserted as last child.
+	if (parent && !old_next) {
+		parent->last_child = sibling;
+	}
+
+	return 1;
+}
+
+int
+cmark_node_prepend_child(cmark_node *node, cmark_node *child)
+{
+	if (!S_can_contain(node, child)) {
+		return 0;
+	}
+
+	S_node_unlink(child);
+
+	cmark_node *old_first_child = node->first_child;
+
+	child->next       = old_first_child;
+	child->prev       = NULL;
+	child->parent     = node;
+	node->first_child = child;
+
+	if (old_first_child) {
+		old_first_child->prev = child;
+	}
+	else {
+		// Also set last_child if node previously had no children.
+		node->last_child = child;
+	}
+
+	return 1;
+}
+
+int
+cmark_node_append_child(cmark_node *node, cmark_node *child)
+{
+	if (!S_can_contain(node, child)) {
+		return 0;
+	}
+
+	S_node_unlink(child);
+
+	cmark_node *old_last_child = node->last_child;
+
+	child->next      = NULL;
+	child->prev      = old_last_child;
+	child->parent    = node;
+	node->last_child = child;
+
+	if (old_last_child) {
+		old_last_child->next = child;
+	}
+	else {
+		// Also set first_child if node previously had no children.
+		node->first_child = child;
+	}
+
+	return 1;
+}
+
+static void
+S_print_error(FILE *out, cmark_node *node, const char *elem)
+{
+	if (out == NULL) {
+		return;
+	}
+	fprintf(out, "Invalid '%s' in node type %s at %d:%d\n", elem,
+		S_type_string(node), node->start_line, node->start_column);
+}
+
+int
+cmark_node_check(cmark_node *node, FILE *out)
+{
+	cmark_node *cur;
+	int errors = 0;
+
+	if (!node) {
+		return 0;
+	}
+
+	cur = node;
+	while (true) {
+		if (cur->first_child) {
+			if (cur->first_child->parent != cur) {
+				S_print_error(out, cur->first_child, "parent");
+				cur->first_child->parent = cur;
+				++errors;
+			}
+			cur = cur->first_child;
+			continue;
+		}
+
+	next_sibling:
+		if (cur == node) {
+			break;
+		}
+		if (cur->next) {
+			if (cur->next->prev != cur) {
+				S_print_error(out, cur->next, "prev");
+				cur->next->prev = cur;
+				++errors;
+			}
+			if (cur->next->parent != cur->parent) {
+				S_print_error(out, cur->next, "parent");
+				cur->next->parent = cur->parent;
+				++errors;
+			}
+			cur = cur->next;
+			continue;
+		}
+
+		if (cur->parent->last_child != cur) {
+			S_print_error(out, cur->parent, "last_child");
+			cur->parent->last_child = cur;
+			++errors;
+		}
+		cur = cur->parent;
+		goto next_sibling;
+	}
+
+	return errors;
+}
+
+// Free a cmark_node list and any children.
+void cmark_free_nodes(cmark_node *e)
+{
+	cmark_node *next;
+	while (e != NULL) {
+		strbuf_free(&e->string_content);
+		switch (e->type){
+		case NODE_FENCED_CODE:
+			strbuf_free(&e->as.code.info);
+			break;
+		case NODE_STRING:
+		case NODE_INLINE_HTML:
+		case NODE_INLINE_CODE:
+			cmark_chunk_free(&e->as.literal);
+			break;
+		case NODE_LINK:
+		case NODE_IMAGE:
+			free(e->as.link.url);
+			free(e->as.link.title);
+			break;
+		default:
+			break;
+		}
+		if (e->last_child) {
+			// Splice children into list
+			e->last_child->next = e->next;
+			e->next = e->first_child;
+		}
+		next = e->next;
+		free(e);
+		e = next;
+	}
+}
+
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/node.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/node.h b/compiler/modules/CommonMark/src/node.h
new file mode 100644
index 0000000..d1245a5
--- /dev/null
+++ b/compiler/modules/CommonMark/src/node.h
@@ -0,0 +1,74 @@
+#ifndef CMARK_NODE_H
+#define CMARK_NODE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+#include "cmark.h"
+#include "buffer.h"
+#include "chunk.h"
+
+typedef struct {
+	cmark_list_type   list_type;
+	int               marker_offset;
+	int               padding;
+	int               start;
+	cmark_delim_type  delimiter;
+	unsigned char     bullet_char;
+	bool              tight;
+} cmark_list;
+
+typedef struct {
+	int               fence_length;
+	int               fence_offset;
+	unsigned char     fence_char;
+	cmark_strbuf      info;
+} cmark_fenced_code;
+
+typedef struct {
+	int level;
+} cmark_header;
+
+typedef struct {
+	unsigned char *url;
+	unsigned char *title;
+} cmark_link;
+
+struct cmark_node {
+	cmark_node_type type;
+
+	struct cmark_node *next;
+	struct cmark_node *prev;
+	struct cmark_node *parent;
+	struct cmark_node *first_child;
+	struct cmark_node *last_child;
+
+	int start_line;
+	int start_column;
+	int end_line;
+	bool open;
+	bool last_line_blank;
+
+	cmark_strbuf string_content;
+
+	union {
+		cmark_chunk       literal;
+		cmark_list        list;
+		cmark_fenced_code code;
+		cmark_header      header;
+		cmark_link        link;
+	} as;
+};
+
+CMARK_EXPORT int
+cmark_node_check(cmark_node *node, FILE *out);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/parser.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/parser.h b/compiler/modules/CommonMark/src/parser.h
new file mode 100644
index 0000000..4bbea09
--- /dev/null
+++ b/compiler/modules/CommonMark/src/parser.h
@@ -0,0 +1,27 @@
+#ifndef CMARK_AST_H
+#define CMARK_AST_H
+
+#include <stdio.h>
+#include "node.h"
+#include "references.h"
+#include "buffer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define MAX_LINK_LABEL_LENGTH 1000
+
+struct cmark_doc_parser {
+	struct cmark_reference_map *refmap;
+	struct cmark_node* root;
+	struct cmark_node* current;
+	int line_number;
+	cmark_strbuf *curline;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/print.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/print.c b/compiler/modules/CommonMark/src/print.c
new file mode 100644
index 0000000..b1bab4b
--- /dev/null
+++ b/compiler/modules/CommonMark/src/print.c
@@ -0,0 +1,182 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "cmark.h"
+#include "node.h"
+#include "debug.h"
+
+static void print_str(const unsigned char *s, int len)
+{
+	int i;
+
+	if (len < 0)
+		len = strlen((char *)s);
+
+	putchar('"');
+	for (i = 0; i < len; ++i) {
+		unsigned char c = s[i];
+
+		switch (c) {
+		case '\n':
+			printf("\\n");
+			break;
+		case '"':
+			printf("\\\"");
+			break;
+		case '\\':
+			printf("\\\\");
+			break;
+		default:
+			putchar((int)c);
+		}
+	}
+	putchar('"');
+}
+
+// Prettyprint an inline list, for debugging.
+static void print_inlines(cmark_node* ils, int indent)
+{
+	int i;
+
+	while(ils != NULL) {
+		for (i=0; i < indent; i++) {
+			putchar(' ');
+		}
+		switch(ils->type) {
+		case NODE_STRING:
+			printf("str ");
+			print_str(ils->as.literal.data, ils->as.literal.len);
+			putchar('\n');
+			break;
+		case NODE_LINEBREAK:
+			printf("linebreak\n");
+			break;
+		case NODE_SOFTBREAK:
+			printf("softbreak\n");
+			break;
+		case NODE_INLINE_CODE:
+			printf("code ");
+			print_str(ils->as.literal.data, ils->as.literal.len);
+			putchar('\n');
+			break;
+		case NODE_INLINE_HTML:
+			printf("html ");
+			print_str(ils->as.literal.data, ils->as.literal.len);
+			putchar('\n');
+			break;
+		case NODE_LINK:
+		case NODE_IMAGE:
+			printf("%s url=", ils->type == NODE_LINK ? "link" : "image");
+
+			if (ils->as.link.url)
+				print_str(ils->as.link.url, -1);
+
+			if (ils->as.link.title) {
+				printf(" title=");
+				print_str(ils->as.link.title, -1);
+			}
+			putchar('\n');
+			print_inlines(ils->first_child, indent + 2);
+			break;
+		case NODE_STRONG:
+			printf("strong\n");
+			print_inlines(ils->first_child, indent + 2);
+			break;
+		case NODE_EMPH:
+			printf("emph\n");
+			print_inlines(ils->first_child, indent + 2);
+			break;
+		default:
+			break;
+		}
+		ils = ils->next;
+	}
+}
+
+// Functions to pretty-print inline and cmark_node lists, for debugging.
+// Prettyprint an inline list, for debugging.
+static void print_blocks(cmark_node* b, int indent)
+{
+	cmark_list *data;
+	int i;
+
+	while(b != NULL) {
+		for (i=0; i < indent; i++) {
+			putchar(' ');
+		}
+
+		switch(b->type) {
+		case NODE_DOCUMENT:
+			printf("document\n");
+			print_blocks(b->first_child, indent + 2);
+			break;
+		case NODE_BLOCK_QUOTE:
+			printf("block_quote\n");
+			print_blocks(b->first_child, indent + 2);
+			break;
+		case NODE_LIST_ITEM:
+			printf("list_item\n");
+			print_blocks(b->first_child, indent + 2);
+			break;
+		case NODE_LIST:
+			data = &(b->as.list);
+			if (data->list_type == CMARK_ORDERED_LIST) {
+				printf("list (type=ordered tight=%s start=%d delim=%s)\n",
+				       (data->tight ? "true" : "false"),
+				       data->start,
+				       (data->delimiter == CMARK_PAREN_DELIM ? "parens" : "period"));
+			} else {
+				printf("list (type=bullet tight=%s bullet_char=%c)\n",
+				       (data->tight ? "true" : "false"),
+				       data->bullet_char);
+			}
+			print_blocks(b->first_child, indent + 2);
+			break;
+		case NODE_ATX_HEADER:
+			printf("atx_header (level=%d)\n", b->as.header.level);
+			print_inlines(b->first_child, indent + 2);
+			break;
+		case NODE_SETEXT_HEADER:
+			printf("setext_header (level=%d)\n", b->as.header.level);
+			print_inlines(b->first_child, indent + 2);
+			break;
+		case NODE_PARAGRAPH:
+			printf("paragraph\n");
+			print_inlines(b->first_child, indent + 2);
+			break;
+		case NODE_HRULE:
+			printf("hrule\n");
+			break;
+		case NODE_INDENTED_CODE:
+			printf("indented_code ");
+			print_str(b->string_content.ptr, -1);
+			putchar('\n');
+			break;
+		case NODE_FENCED_CODE:
+			printf("fenced_code length=%d info=",
+			       b->as.code.fence_length);
+			print_str(b->as.code.info.ptr, -1);
+			putchar(' ');
+			print_str(b->string_content.ptr, -1);
+			putchar('\n');
+			break;
+		case NODE_HTML:
+			printf("html_block ");
+			print_str(b->string_content.ptr, -1);
+			putchar('\n');
+			break;
+		case NODE_REFERENCE_DEF:
+			printf("reference_def\n");
+			break;
+		default:
+			printf("# NOT IMPLEMENTED (%d)\n", b->type);
+			break;
+		}
+		b = b->next;
+	}
+}
+
+void cmark_debug_print(cmark_node *root)
+{
+	print_blocks(root, 0);
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/references.c
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/references.c b/compiler/modules/CommonMark/src/references.c
new file mode 100644
index 0000000..1738de1
--- /dev/null
+++ b/compiler/modules/CommonMark/src/references.c
@@ -0,0 +1,153 @@
+#include "cmark.h"
+#include "utf8.h"
+#include "parser.h"
+#include "references.h"
+#include "inlines.h"
+#include "chunk.h"
+
+static unsigned int
+refhash(const unsigned char *link_ref)
+{
+	unsigned int hash = 0;
+
+	while (*link_ref)
+		hash = (*link_ref++) + (hash << 6) + (hash << 16) - hash;
+
+	return hash;
+}
+
+static void reference_free(reference *ref)
+{
+	if(ref != NULL) {
+		free(ref->label);
+		free(ref->url);
+		free(ref->title);
+		free(ref);
+	}
+}
+
+// normalize reference:  collapse internal whitespace to single space,
+// remove leading/trailing whitespace, case fold
+// Return NULL if the reference name is actually empty (i.e. composed
+// solely from whitespace)
+static unsigned char *normalize_reference(chunk *ref)
+{
+	strbuf normalized = GH_BUF_INIT;
+	unsigned char *result;
+
+	if(ref == NULL)
+		return NULL;
+
+	if (ref->len == 0)
+		return NULL;
+
+	utf8proc_case_fold(&normalized, ref->data, ref->len);
+	strbuf_trim(&normalized);
+	strbuf_normalize_whitespace(&normalized);
+
+	result = strbuf_detach(&normalized);
+	assert(result);
+
+	if (result[0] == '\0') {
+		free(result);
+		return NULL;
+	}
+
+	return result;
+}
+
+static void add_reference(reference_map *map, reference* ref)
+{
+	reference *t = ref->next = map->table[ref->hash % REFMAP_SIZE];
+
+	while (t) {
+		if (t->hash == ref->hash &&
+		    !strcmp((char *)t->label, (char *)ref->label)) {
+			reference_free(ref);
+			return;
+		}
+
+		t = t->next;
+	}
+
+	map->table[ref->hash % REFMAP_SIZE] = ref;
+}
+
+extern void reference_create(reference_map *map, chunk *label, chunk *url, chunk *title)
+{
+	reference *ref;
+	unsigned char *reflabel = normalize_reference(label);
+
+	/* empty reference name, or composed from only whitespace */
+	if (reflabel == NULL)
+		return;
+
+	ref = (reference *)calloc(1, sizeof(*ref));
+	if(ref != NULL) {
+		ref->label = reflabel;
+		ref->hash = refhash(ref->label);
+		ref->url = clean_url(url);
+		ref->title = clean_title(title);
+		ref->next = NULL;
+
+		add_reference(map, ref);
+	}
+}
+
+// Returns reference if refmap contains a reference with matching
+// label, otherwise NULL.
+reference* reference_lookup(reference_map *map, chunk *label)
+{
+	reference *ref = NULL;
+	unsigned char *norm;
+	unsigned int hash;
+
+	if (label->len > MAX_LINK_LABEL_LENGTH)
+		return NULL;
+
+	if (map == NULL)
+		return NULL;
+
+	norm = normalize_reference(label);
+	if (norm == NULL)
+		return NULL;
+
+	hash = refhash(norm);
+	ref = map->table[hash % REFMAP_SIZE];
+
+	while (ref) {
+		if (ref->hash == hash &&
+		    !strcmp((char *)ref->label, (char *)norm))
+			break;
+		ref = ref->next;
+	}
+
+	free(norm);
+	return ref;
+}
+
+void reference_map_free(reference_map *map)
+{
+	unsigned int i;
+
+	if(map == NULL)
+		return;
+
+	for (i = 0; i < REFMAP_SIZE; ++i) {
+		reference *ref = map->table[i];
+		reference *next;
+
+		while (ref) {
+			next = ref->next;
+			reference_free(ref);
+			ref = next;
+		}
+	}
+
+	free(map);
+}
+
+reference_map *reference_map_new(void)
+{
+	return (reference_map *)calloc(1, sizeof(reference_map));
+}

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/144f0b22/compiler/modules/CommonMark/src/references.h
----------------------------------------------------------------------
diff --git a/compiler/modules/CommonMark/src/references.h b/compiler/modules/CommonMark/src/references.h
new file mode 100644
index 0000000..572178d
--- /dev/null
+++ b/compiler/modules/CommonMark/src/references.h
@@ -0,0 +1,46 @@
+#ifndef CMARK_REFERENCES_H
+#define CMARK_REFERENCES_H
+
+#include "chunk.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define REFMAP_SIZE 16
+
+struct cmark_reference {
+	struct cmark_reference *next;
+	unsigned char *label;
+	unsigned char *url;
+	unsigned char *title;
+	unsigned int hash;
+};
+
+typedef struct cmark_reference cmark_reference;
+
+struct cmark_reference_map {
+	cmark_reference *table[REFMAP_SIZE];
+};
+
+typedef struct cmark_reference_map cmark_reference_map;
+
+cmark_reference_map *cmark_reference_map_new(void);
+void cmark_reference_map_free(cmark_reference_map *map);
+cmark_reference* cmark_reference_lookup(cmark_reference_map *map, cmark_chunk *label);
+extern void cmark_reference_create(cmark_reference_map *map, cmark_chunk *label, cmark_chunk *url, cmark_chunk *title);
+
+#ifndef CMARK_NO_SHORT_NAMES
+  #define reference             cmark_reference
+  #define reference_map         cmark_reference_map
+  #define reference_map_new     cmark_reference_map_new
+  #define reference_map_free    cmark_reference_map_free
+  #define reference_lookup      cmark_reference_lookup
+  #define reference_create      cmark_reference_create
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


[13/16] lucy-clownfish git commit: Convert Markdown to POD

Posted by nw...@apache.org.
Convert Markdown to POD


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f57df2fc
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f57df2fc
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f57df2fc

Branch: refs/heads/markdown
Commit: f57df2fc21e610e82a39a6d37f85b327f8bf420b
Parents: 12d994b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Nov 10 17:35:22 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Nov 23 18:35:49 2014 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC.xs |   4 +-
 compiler/src/CFCClass.c            |   8 +
 compiler/src/CFCClass.h            |   8 +
 compiler/src/CFCPerlClass.c        |  34 ++--
 compiler/src/CFCPerlPod.c          | 307 ++++++++++++++++++++++++++++++--
 compiler/src/CFCPerlPod.h          |   2 +-
 6 files changed, 327 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/perl/lib/Clownfish/CFC.xs
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC.xs b/compiler/perl/lib/Clownfish/CFC.xs
index a6ea249..1732653 100644
--- a/compiler/perl/lib/Clownfish/CFC.xs
+++ b/compiler/perl/lib/Clownfish/CFC.xs
@@ -2463,11 +2463,11 @@ PPCODE:
 
 
 SV*
-_perlify_doc_text(self, source)
+_md_to_pod(self, source)
     CFCPerlPod   *self;
     const char   *source;
 CODE:
-    RETVAL = S_sv_eat_c_string(CFCPerlPod_perlify_doc_text(self, source));
+    RETVAL = S_sv_eat_c_string(CFCPerlPod_md_to_pod(self, source));
 OUTPUT: RETVAL
 
 SV*

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/src/CFCClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCClass.c b/compiler/src/CFCClass.c
index 59ec8c3..6a23183 100644
--- a/compiler/src/CFCClass.c
+++ b/compiler/src/CFCClass.c
@@ -314,6 +314,14 @@ CFCClass_fetch_singleton(CFCParcel *parcel, const char *class_name) {
     }
     char key[MAX_SINGLETON_LEN + 1];
     sprintf(key, "%s%s", prefix, struct_sym);
+
+    return CFCClass_fetch_by_struct_sym(key);
+}
+
+CFCClass*
+CFCClass_fetch_by_struct_sym(const char *key) {
+    CFCUTIL_NULL_CHECK(key);
+
     for (size_t i = 0; i < registry_size; i++) {
         if (strcmp(registry[i].key, key) == 0) {
             return registry[i].klass;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/src/CFCClass.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCClass.h b/compiler/src/CFCClass.h
index 877a84a..8d7f4d8 100644
--- a/compiler/src/CFCClass.h
+++ b/compiler/src/CFCClass.h
@@ -82,6 +82,14 @@ CFCClass_destroy(CFCClass *self);
 CFCClass*
 CFCClass_fetch_singleton(struct CFCParcel *parcel, const char *class_name);
 
+/** Retrieve a Class by its struct sym.
+ *
+ * @param A Clownfish::CFC::Model::Parcel.
+ * @param full_struct_sym The Class's full struct sym.
+ */
+CFCClass*
+CFCClass_fetch_by_struct_sym(const char *full_struct_sym);
+
 /** Empty out the registry, decrementing the refcount of all Class singleton
  * objects.
  */

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/src/CFCPerlClass.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlClass.c b/compiler/src/CFCPerlClass.c
index aa3d738..57561c3 100644
--- a/compiler/src/CFCPerlClass.c
+++ b/compiler/src/CFCPerlClass.c
@@ -361,14 +361,18 @@ CFCPerlClass_create_pod(CFCPerlClass *self) {
 
     // Get the class's brief description.
     const char *raw_brief = CFCDocuComment_get_brief(docucom);
-    char *brief = CFCPerlPod_perlify_doc_text(pod_spec, raw_brief);
+    char *brief = CFCPerlPod_md_to_pod(pod_spec, raw_brief);
 
     // Get the class's long description.
-    const char *raw_description = CFCPerlPod_get_description(pod_spec);
-    if (!raw_description || !strlen(raw_description)) {
-        raw_description = CFCDocuComment_get_long(docucom);
+    char *description;
+    const char *pod_description = CFCPerlPod_get_description(pod_spec);
+    if (pod_description && strlen(pod_description)) {
+        description = CFCUtil_sprintf("%s\n", pod_description);
+    }
+    else {
+        const char *raw_description = CFCDocuComment_get_long(docucom);
+        description = CFCPerlPod_md_to_pod(pod_spec, raw_description);
     }
-    char *description = CFCPerlPod_perlify_doc_text(pod_spec, raw_description);
 
     // Create SYNOPSIS.
     const char *raw_synopsis = CFCPerlPod_get_synopsis(pod_spec);
@@ -401,27 +405,21 @@ CFCPerlClass_create_pod(CFCPerlClass *self) {
                                           ancestor_klass, NULL);
             }
         }
-        inheritance = CFCUtil_cat(inheritance, ".\n", NULL);
+        inheritance = CFCUtil_cat(inheritance, ".\n\n", NULL);
     }
 
     // Put it all together.
     const char pattern[] =
         "=head1 NAME\n"
         "\n"
-        "%s - %s\n"
-        "\n"
-        "%s\n"
-        "\n"
+        "%s - %s"
+        "%s"
         "=head1 DESCRIPTION\n"
         "\n"
-        "%s\n"
-        "\n"
-        "%s\n"
-        "\n"
-        "%s\n"
-        "\n"
-        "%s\n"
-        "\n"
+        "%s"
+        "%s"
+        "%s"
+        "%s"
         "=cut\n"
         "\n";
     char *pod

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index b864fcb..28b98db 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/compiler/src/CFCPerlPod.c
@@ -16,6 +16,9 @@
 
 #include <string.h>
 #include <ctype.h>
+
+#include <cmark.h>
+
 #define CFC_NEED_BASE_STRUCT_DEF
 #include "CFCBase.h"
 #include "CFCPerlPod.h"
@@ -55,6 +58,18 @@ static const CFCMeta CFCPERLPOD_META = {
     (CFCBase_destroy_t)CFCPerlPod_destroy
 };
 
+static char*
+S_nodes_to_pod(cmark_node *node);
+
+static char*
+S_pod_escape(const char *content);
+
+static char*
+S_convert_uri(const char *uri);
+
+static char*
+S_perlify_pod(const char *source);
+
 CFCPerlPod*
 CFCPerlPod_new(void) {
     CFCPerlPod *self
@@ -161,16 +176,14 @@ CFCPerlPod_methods_pod(CFCPerlPod *self, CFCClass *klass) {
         }
         char *meth_pod;
         if (meth_spec.pod) {
-            meth_pod = CFCPerlPod_perlify_doc_text(self, meth_spec.pod);
+            meth_pod = CFCUtil_sprintf("%s\n", meth_spec.pod);
         }
         else {
-            char *raw
+            meth_pod
                 = CFCPerlPod_gen_subroutine_pod(self, (CFCFunction*)method,
                                                 meth_spec.alias, klass,
                                                 meth_spec.sample, class_name,
                                                 false);
-            meth_pod = CFCPerlPod_perlify_doc_text(self, raw);
-            FREEMEM(raw);
         }
         if (CFCMethod_abstract(method)) {
             abstract_pod = CFCUtil_cat(abstract_pod, meth_pod, NULL);
@@ -204,19 +217,15 @@ CFCPerlPod_constructors_pod(CFCPerlPod *self, CFCClass *klass) {
     for (size_t i = 0; i < self->num_constructors; i++) {
         NamePod slot = self->constructors[i];
         if (slot.pod) {
-            char *perlified = CFCPerlPod_perlify_doc_text(self, slot.pod);
-            pod = CFCUtil_cat(pod, perlified, NULL);
-            FREEMEM(perlified);
+            pod = CFCUtil_cat(pod, slot.pod, "\n", NULL);
         }
         else {
             CFCFunction *init_func = CFCClass_function(klass, slot.func);
             char *sub_pod
                 = CFCPerlPod_gen_subroutine_pod(self, init_func, slot.alias, klass,
                                                 slot.sample, class_name, true);
-            char *perlified = CFCPerlPod_perlify_doc_text(self, sub_pod);
-            pod = CFCUtil_cat(pod, perlified, NULL);
+            pod = CFCUtil_cat(pod, sub_pod, NULL);
             FREEMEM(sub_pod);
-            FREEMEM(perlified);
         }
     }
     return pod;
@@ -318,8 +327,8 @@ CFCPerlPod_gen_subroutine_pod(CFCPerlPod *self, CFCFunction *func,
     // Incorporate "description" text from DocuComment.
     const char *long_doc = CFCDocuComment_get_description(docucomment);
     if (long_doc && strlen(long_doc)) {
-        char *perlified = CFCPerlPod_perlify_doc_text(self, long_doc);
-        pod = CFCUtil_cat(pod, perlified, "\n\n", NULL);
+        char *perlified = CFCPerlPod_md_to_pod(self, long_doc);
+        pod = CFCUtil_cat(pod, perlified, NULL);
         FREEMEM(perlified);
     }
 
@@ -329,8 +338,10 @@ CFCPerlPod_gen_subroutine_pod(CFCPerlPod *self, CFCFunction *func,
     if (param_names[0]) {
         pod = CFCUtil_cat(pod, "=over\n\n", NULL);
         for (size_t i = 0; param_names[i] != NULL; i++) {
+            char *perlified = CFCPerlPod_md_to_pod(self, param_docs[i]);
             pod = CFCUtil_cat(pod, "=item *\n\nB<", param_names[i], "> - ",
-                              param_docs[i], "\n\n", NULL);
+                              perlified, NULL);
+            FREEMEM(perlified);
         }
         pod = CFCUtil_cat(pod, "=back\n\n", NULL);
     }
@@ -338,16 +349,282 @@ CFCPerlPod_gen_subroutine_pod(CFCPerlPod *self, CFCFunction *func,
     // Add return value description, if any.
     const char *retval_doc = CFCDocuComment_get_retval(docucomment);
     if (retval_doc && strlen(retval_doc)) {
-        pod = CFCUtil_cat(pod, "Returns: ", retval_doc, "\n\n", NULL);
+        char *perlified = CFCPerlPod_md_to_pod(self, retval_doc);
+        pod = CFCUtil_cat(pod, "Returns: ", perlified, NULL);
+        FREEMEM(perlified);
     }
 
     return pod;
 }
 
 char*
-CFCPerlPod_perlify_doc_text(CFCPerlPod *self, const char *source) {
+CFCPerlPod_md_to_pod(CFCPerlPod *self, const char *md) {
     (void)self; // unused
 
+    cmark_node *doc = cmark_parse_document(md, strlen(md));
+    char *pod = S_nodes_to_pod(doc);
+    cmark_node_destroy(doc);
+    char *perlified = S_perlify_pod(pod);
+
+    FREEMEM(pod);
+    return perlified;
+}
+
+static char*
+S_nodes_to_pod(cmark_node *node) {
+    char *result = CFCUtil_strdup("");
+
+    while (node) {
+        cmark_node_type type = cmark_node_get_type(node);
+
+        switch (type) {
+            case NODE_DOCUMENT: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, children_pod, NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_PARAGRAPH: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, children_pod, "\n\n", NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_BLOCK_QUOTE: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, "=over\n\n", children_pod,
+                                     "\n=back\n\n", NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_LIST_ITEM: {
+                // TODO: Ordered lists.
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, "=item *\n\n", children_pod,
+                                     NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_LIST: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, "=over\n\n", children_pod,
+                                     "=back\n\n", NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_ATX_HEADER:
+            case NODE_SETEXT_HEADER: {
+                cmark_node *child = cmark_node_first_child(node);
+                int header_level = cmark_node_get_header_level(node);
+                char *children_pod = S_nodes_to_pod(child);
+                char *header = CFCUtil_sprintf("=head%d %s\n\n",
+                                               header_level + 2, children_pod);
+                result = CFCUtil_cat(result, header, NULL);
+                FREEMEM(header);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_INDENTED_CODE:
+            case NODE_FENCED_CODE: {
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_pod_escape(content);
+                // Chomp trailing newline.
+                size_t len = strlen(escaped);
+                if (len > 0 && escaped[len-1] == '\n') {
+                    escaped[len-1] = '\0';
+                }
+                char *indented = S_global_replace(escaped, "\n", "\n    ");
+                result = CFCUtil_cat(result, "    ", indented, "\n\n", NULL);
+                FREEMEM(indented);
+                FREEMEM(escaped);
+                break;
+            }
+
+            case NODE_HTML: {
+                const char *html = cmark_node_get_string_content(node);
+                result = CFCUtil_cat(result, "=begin html\n\n", html,
+                                     "\n=end\n\n", NULL);
+                break;
+            }
+
+            case NODE_HRULE:
+                break;
+
+            case NODE_REFERENCE_DEF:
+                break;
+
+            case NODE_STRING: {
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_pod_escape(content);
+                result = CFCUtil_cat(result, escaped, NULL);
+                FREEMEM(escaped);
+                break;
+            }
+
+            case NODE_LINEBREAK:
+                // POD doesn't support line breaks. Start a new paragraph.
+                result = CFCUtil_cat(result, "\n\n", NULL);
+                break;
+
+            case NODE_SOFTBREAK:
+                result = CFCUtil_cat(result, "\n", NULL);
+                break;
+
+            case NODE_INLINE_CODE: {
+                const char *content = cmark_node_get_string_content(node);
+                char *escaped = S_pod_escape(content);
+                result = CFCUtil_cat(result, "C<", escaped, ">", NULL);
+                FREEMEM(escaped);
+                break;
+            }
+
+            case NODE_INLINE_HTML: {
+                const char *html = cmark_node_get_string_content(node);
+                CFCUtil_warn("Inline HTML not supported in POD: %s", html);
+                break;
+            }
+
+            case NODE_LINK: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                char *uri = S_convert_uri(cmark_node_get_url(node));
+                if (children_pod[0] == '\0'
+                    || strcmp(children_pod, uri) == 0
+                ) {
+                    result = CFCUtil_cat(result, "L<", uri, ">", NULL);
+                }
+                else {
+                    result = CFCUtil_cat(result, "L<", children_pod, "|", uri,
+                                         ">", NULL);
+                }
+                FREEMEM(children_pod);
+                FREEMEM(uri);
+                break;
+            }
+
+            case NODE_IMAGE:
+                CFCUtil_warn("Images not supported in POD");
+                break;
+
+            case NODE_STRONG: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, "B<", children_pod, ">", NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            case NODE_EMPH: {
+                cmark_node *child = cmark_node_first_child(node);
+                char *children_pod = S_nodes_to_pod(child);
+                result = CFCUtil_cat(result, "I<", children_pod, ">", NULL);
+                FREEMEM(children_pod);
+                break;
+            }
+
+            default:
+                CFCUtil_die("Invalid cmark node type: %d", type);
+                break;
+        }
+
+        node = cmark_node_next(node);
+    }
+
+    return result;
+}
+
+static char*
+S_pod_escape(const char *content) {
+    size_t  len        = strlen(content);
+    size_t  result_len = 0;
+    size_t  result_cap = len + 256;
+    char   *result     = (char*)MALLOCATE(result_cap + 1);
+
+    for (size_t i = 0; i < len; i++) {
+        const char *subst      = content + i;
+        size_t      subst_size = 1;
+
+        switch (content[i]) {
+            case '<':
+                // Escape "less than".
+                subst      = "E<lt>";
+                subst_size = 5;
+                break;
+            case '>':
+                // Escape "greater than".
+                subst      = "E<gt>";
+                subst_size = 5;
+                break;
+            case '|':
+                // Escape vertical bar.
+                subst      = "E<verbar>";
+                subst_size = 9;
+                break;
+            case '=':
+                // Escape equal sign at start of line.
+                if (i == 0 || content[i-1] == '\n') {
+                    subst      = "E<61>";
+                    subst_size = 5;
+                }
+                break;
+            default:
+                break;
+        }
+
+        if (result_len + subst_size > result_cap) {
+            result_cap += 256;
+            result = (char*)REALLOCATE(result, result_cap + 1);
+        }
+
+        memcpy(result + result_len, subst, subst_size);
+        result_len += subst_size;
+    }
+
+    result[result_len] = '\0';
+
+    return result;
+}
+
+static char*
+S_convert_uri(const char *uri) {
+    if (memcmp(uri, "clownfish:", 10) != 0) {
+        return CFCUtil_strdup(uri);
+    }
+    if (memcmp(uri, "clownfish:class:", 16) != 0) {
+        CFCUtil_die("Invalid clownfish URI: %s", uri);
+    }
+
+    // Convert 'clownfish:class:{parcel}:{name}' to '{class_name}'
+    const char *src   = uri + 16;
+    const char *colon = strchr(src, ':');
+    if (!colon) {
+        CFCUtil_die("Invalid clownfish URI: %s", uri);
+    }
+    char *struct_sym = CFCUtil_strdup(src);
+    struct_sym[colon-src] = '_';
+    CFCClass *klass = CFCClass_fetch_by_struct_sym(struct_sym);
+    FREEMEM(struct_sym);
+    if (!klass) {
+        CFCUtil_warn("No class found for URI %s\n", uri);
+        return CFCUtil_strdup(uri);
+    }
+
+    return CFCUtil_strdup(CFCClass_get_class_name(klass));
+}
+
+static char*
+S_perlify_pod(const char *source) {
     // Change `foo` to C<< foo >>.
     char *copy = CFCUtil_strdup(source);
     char *orig = copy;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f57df2fc/compiler/src/CFCPerlPod.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.h b/compiler/src/CFCPerlPod.h
index 38bb0c1..1ebac1a 100644
--- a/compiler/src/CFCPerlPod.h
+++ b/compiler/src/CFCPerlPod.h
@@ -99,7 +99,7 @@ const char*
 CFCPerlPod_get_description(CFCPerlPod *self);
 
 char*
-CFCPerlPod_perlify_doc_text(CFCPerlPod *self, const char *source);
+CFCPerlPod_md_to_pod(CFCPerlPod *self, const char *source);
 
 /** Autogenerate pod for either a Clownfish::CFC::Model::Method or a
  * Clownfish::CFC::Model::Function.