Use flex for generating the scanner, add support for parsing from strings
[platform/upstream/libxkbcommon.git] / src / xkbcomp / xkbparse.y
index 713cc1d..ab21681 100644 (file)
@@ -89,6 +89,7 @@
        FUNCTION_KEYS           76
        ALTERNATE_GROUP         77
 %{
+#define DEBUG 1
 #ifdef DEBUG
 #define        YYDEBUG 1
 #endif
@@ -765,23 +766,3 @@ OptMapName :       MapName { $$= $1; }
 
 MapName                :       STRING  { $$= strdup(scanBuf); }
                ;
-%%
-void
-yyerror(const char *s)
-{
-    if (warningLevel>0) {
-       (void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum,
-                                       (scanFile?scanFile:"(unknown)"));
-       if ((warningLevel>3))
-           (void)fprintf(stderr,"last scanned symbol is: %s\n",scanBuf);
-    }
-    return;
-}
-
-
-int
-yywrap(void)
-{
-   return 1;
-}
-