Enlightenment CVS committal
Author : dj2
Project : e17
Module : proto
Dir : e17/proto/edje_cc
Modified Files:
edje.l edje.y
Log Message:
error checking and data block
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/edje_cc/edje.l,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- edje.l 7 Sep 2004 23:29:00 -0000 1.1
+++ edje.l 7 Sep 2004 23:46:43 -0000 1.2
@@ -108,10 +108,16 @@
y { KEYWORD_RETURN(Y); }
{string} { STRING_RETURN(); }
{floating_constant} { FLOAT_RETURN(); }
-\} { KEYWORD_RETURN(CLOSE_BRACE); }
-\{ { KEYWORD_RETURN(OPEN_BRACE); }
+\} { KEYWORD_RETURN(CLOSE_BRACE); }
+\{ { KEYWORD_RETURN(OPEN_BRACE); }
[ \t]+ { WHITE_SPACE(); }
\n { NEW_LINE(); }
+# { CPP_COMMENT(); }
+
. { CHAR_RETURN(); }
+
+
%%
+
+
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/edje_cc/edje.y,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- edje.y 7 Sep 2004 23:29:00 -0000 1.1
+++ edje.y 7 Sep 2004 23:46:43 -0000 1.2
@@ -2,13 +2,13 @@
#include <stdio.h>
#include <string.h>
-void yyerror(const char *str) {
- fprintf(stderr, "yyerror: %s\n", str);
-}
-int yywrap() {
- return 1;
-}
+ #define YYDEBUG 1
+ void yyerror(const char *s);
+ void parse_error(void);
+
+ extern int lnum;
+ extern int col;
%}
%union {
@@ -31,9 +31,18 @@
%type <val> FLOAT
%%
-edjes: images edjes |
+
+
+edjes: /* blank */ |
+ images edjes |
fonts edjes |
collections edjes |
+ data edjes |
+ error {
+ parse_error();
+ yyerrok;
+ yyclearin;
+ }
;
collections: COLLECTIONS OPEN_BRACE group CLOSE_BRACE
;
@@ -41,9 +50,26 @@
;
images: IMAGES OPEN_BRACE statement CLOSE_BRACE
;
+data: DATA OPEN_BRACE statement CLOSE_BRACE
+ ;
statement: STRING
|
;
group: statement
;
%%
+
+void yyerror(const char *str) {
+ fprintf(stderr, "yyerror: %s\n", str);
+}
+int yywrap() {
+ return 1;
+}
+
+void parse_error(void) {
+ fprintf(stderr, "file: %s, line: %d, column: %d\n\n",
+ __FILE__, lnum, col);
+ exit(-1);
+}
+
+
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs