wesnoth-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-patches] [patch #3572] Improvement/fix to parsing of parenthese


From: Guillaume Melquiond
Subject: [Wesnoth-patches] [patch #3572] Improvement/fix to parsing of parentheses( ( , ) ) in macro arguments
Date: Sat, 18 Dec 2004 04:48:27 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20041207 Firefox/1.0 (Debian package 1.0-5)

This mail is an automated notification from the patch tracker
 of the project: Battle for Wesnoth.

/**************************************************************************/
[patch #3572] Latest Modifications:

Changes by: 
                Guillaume Melquiond <address@hidden>
'Date: 
                sam 18.12.2004 at 09:34 (Europe/Paris)

------------------ Additional Follow-up Comments ----------------------------
Hmmm... I don't approve of this patch. WML parsing rules are already awful, no 
need for them to become even worse. I'm all for the quotes hiding parentheses, 
and the quotes having hence to be balanced. Especially now that we allow string 
concatenation. So {MACROX ("abc) (def")} should really be a one-argument macro. 
And not only quotes, but also () and {} outside of quotes should be balanced in 
macro arguments.






/**************************************************************************/
[patch #3572] Full Item Snapshot:

URL: <http://savannah.nongnu.org/patch/?func=detailitem&item_id=3572>
Project: Battle for Wesnoth
Submitted by: Isaac Dupree
On: mar 14.12.2004 at 20:23

Category:  None
Priority:  5 - Normal
Resolution:  None
Privacy:  Public
Assigned to:  None
Originator Email:  
Status:  Open


Summary:  Improvement/fix to parsing of parentheses( ( , ) ) in macro arguments

Original Submission:  It is basically a rewrite of parse_macro_arguments().  
This fixes bug #10995 (which I submitted before I got an account) and tries to 
do the best job for various situations.  My code's comments explain why it does 
some of the more mysterious parts of the code and the only situation I could 
think of where it wouldn't work, which would probably never happen, doesn't 
have a good solution, and would be hard-to-understand WML anyway.

Other particular improvements over the current code are:
* You can specify a totally empty macro argument with {MACRO ()}; the current 
code would interpret that argument as a single space.
* Consecutive spaces in parenthesized arguments are preserved: {MACRO (Several 
spaces:    .)}.  The current code (as well as HTML -- ugh) reduces the string 
of spaces in the argument to one space, but my code will preserve it.

Follow-up Comments
------------------


-------------------------------------------------------
Date: sam 18.12.2004 at 09:34       By: Guillaume Melquiond <silene>
Hmmm... I don't approve of this patch. WML parsing rules are already awful, no 
need for them to become even worse. I'm all for the quotes hiding parentheses, 
and the quotes having hence to be balanced. Especially now that we allow string 
concatenation. So {MACROX ("abc) (def")} should really be a one-argument macro. 
And not only quotes, but also () and {} outside of quotes should be balanced in 
macro arguments.






File Attachments
-------------------

-------------------------------------------------------
Date: mar 14.12.2004 at 20:23  Name: config-cpp.diff  Size: 4,32KB   By: 
invisibleph

http://savannah.nongnu.org/patch/download.php?item_id=3572&amp;item_file_id=3945






For detailed info, follow this link:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=3572>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]