aboutsummaryrefslogtreecommitdiffstats
path: root/edify/parser.y
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-02-13 15:07:56 -0800
committerDoug Zongker <dougz@android.com>2014-02-13 15:34:18 -0800
commit0d32f259cddeaf46917bdc4af3514114c206dd76 (patch)
tree6d6a6f6793cd8a335dbc6f3d6ed21598748378dd /edify/parser.y
parenta1bc148c7c81f886426c253f2ea7beb0f301f6b0 (diff)
downloadbootable_recovery-0d32f259cddeaf46917bdc4af3514114c206dd76.tar.gz
bootable_recovery-0d32f259cddeaf46917bdc4af3514114c206dd76.tar.bz2
bootable_recovery-0d32f259cddeaf46917bdc4af3514114c206dd76.zip
clean up some warnings when building recovery
Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
Diffstat (limited to 'edify/parser.y')
-rw-r--r--edify/parser.y9
1 files changed, 9 insertions, 0 deletions
diff --git a/edify/parser.y b/edify/parser.y
index 3f9ade1..f8fb2d1 100644
--- a/edify/parser.y
+++ b/edify/parser.y
@@ -29,6 +29,10 @@ extern int gColumn;
void yyerror(Expr** root, int* error_count, const char* s);
int yyparse(Expr** root, int* error_count);
+struct yy_buffer_state;
+void yy_switch_to_buffer(struct yy_buffer_state* new_buffer);
+struct yy_buffer_state* yy_scan_string(const char* yystr);
+
%}
%locations
@@ -128,3 +132,8 @@ void yyerror(Expr** root, int* error_count, const char* s) {
printf("line %d col %d: %s\n", gLine, gColumn, s);
++*error_count;
}
+
+int parse_string(const char* str, Expr** root, int* error_count) {
+ yy_switch_to_buffer(yy_scan_string(str));
+ return yyparse(root, error_count);
+}