davidg Tue Mar 13 04:19:41 2001 EDT
Modified files:
/php4/ext/midgard preparser-scanner.l
Log:
fixed bug http://www.midgard-project.org/bugs/?id=135
Index: php4/ext/midgard/preparser-scanner.l
diff -u php4/ext/midgard/preparser-scanner.l:1.6
php4/ext/midgard/preparser-scanner.l:1.7
--- php4/ext/midgard/preparser-scanner.l:1.6 Tue Mar 13 00:03:08 2001
+++ php4/ext/midgard/preparser-scanner.l Tue Mar 13 04:19:39 2001
@@ -1,6 +1,6 @@
%{
-/* $Id: preparser-scanner.l,v 1.6 2001/03/13 08:03:08 davidg Exp $
+/* $Id: preparser-scanner.l,v 1.7 2001/03/13 12:19:39 davidg Exp $
Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]>
Copyright (C) 2000 The Midgard Project ry
Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]>
@@ -32,6 +32,8 @@
%}
%x IN_PHP
+%x IN_PHPQ
+%x IN_PHPQQ
%x IN_LCOMMENT
%x IN_TEMPLATE
%x IN_FORMAT
@@ -84,6 +86,44 @@
yy_pop_state();
}
+<IN_PHP>{quote} {
+ yy_push_state(IN_PHPQ);
+ in_string = mgdtext[0];
+ mgd_append_output_buffer(yytext);
+}
+
+<IN_PHP>{dquote} {
+ yy_push_state(IN_PHPQQ);
+ in_string = mgdtext[0];
+ mgd_append_output_buffer(yytext);
+}
+
+<IN_PHPQ>[\\]{quote} {
+ mgd_append_output_buffer(yytext);
+}
+
+<IN_PHPQ>{quote} {
+ mgd_append_output_buffer(yytext);
+ yy_pop_state();
+}
+
+<IN_PHPQ>{ANY} {
+ mgd_append_output_buffer(yytext);
+}
+
+<IN_PHPQQ>[\\]{dquote} {
+ mgd_append_output_buffer(yytext);
+}
+
+<IN_PHPQQ>{dquote} {
+ mgd_append_output_buffer(yytext);
+ yy_pop_state();
+}
+
+<IN_PHPQQ>{ANY} {
+ mgd_append_output_buffer(yytext);
+}
+
<IN_PHP>{ANY} {
#ifdef SCANNER_DEBUG
mgd_append_output_buffer_const(" <6: misc char> ");
@@ -109,13 +149,6 @@
yy_pop_state(); // pop IN_PHP
}
-<IN_PHP>{qstring}|{dqstring} {
-#ifdef SCANNER_DEBUG
- mgd_append_output_buffer_const(" <5: String> ");
-#endif
- mgd_append_output_buffer(yytext);
-}
-
<INITIAL>"<"[\[\(]/{MIDGARD_TEMPLATE_NAME}[\]\)]">" {
#ifdef SCANNER_DEBUG
mgd_append_output_buffer_const(" <9: Found start of element> ");
@@ -344,6 +377,15 @@
}
%%
+/*
+<IN_PHP>{qstring}|{dqstring} {
+#ifdef SCANNER_DEBUG
+ mgd_append_output_buffer_const(" <5: String> ");
+#endif
+ mgd_append_output_buffer(yytext);
+}
+
+*/
char * php_eval_midgard(midgard_pool * pool, const char *name, char *value, int
exit_php)
{
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]