+
+struct cdecl *cdecl_parse_english(const char *english)
+{
+ YY_BUFFER_STATE state;
+ yyscan_t scanner;
+ struct cdecl *decl;
+ int rc;
+
+ cdecl__init_i18n();
+
+ rc = cdecl__yylex_init_extra(true, &scanner);
+ if (rc != 0)
+ return NULL;
+
+ state = cdecl__yy_scan_string(english, scanner);
+ rc = cdecl__yyparse(scanner, &decl);
+ cdecl__yy_delete_buffer(state, scanner);
+ cdecl__yylex_destroy(scanner);
+
+ if (rc != 0)
+ return NULL;
+
+ for (struct cdecl *i = decl; i; i = i->next) {
+ i->specifiers = cdecl__normalize_specs(i->specifiers);
+
+ if (!forall_declarators(i, check_parameters))
+ goto err;
+ if (!forall_declarators(i, check_rettypes))
+ goto err;
+ if (!forall_declarators(i, check_arrays))
+ goto err;
+ if (!forall_declarators(i, normalize_specs))
+ goto err;
+
+ if (!valid_declspecs(i, true))
+ goto err;
+ }
+
+ return decl;
+err:
+ cdecl__free(decl);
+ return NULL;
+}
+
+void cdecl_free(struct cdecl *decl)
+{
+ cdecl__free(decl);
+}