Author: grumbel
Date: 2007-11-02 17:36:02 +0100 (Fri, 02 Nov 2007)
New Revision: 3468
Modified:
trunk/pingus/contrib/sexpr.rb
Log:
- little bug fix
Modified: trunk/pingus/contrib/sexpr.rb
===================================================================
--- trunk/pingus/contrib/sexpr.rb 2007-11-02 16:32:04 UTC (rev 3467)
+++ trunk/pingus/contrib/sexpr.rb 2007-11-02 16:36:02 UTC (rev 3468)
@@ -64,7 +64,12 @@
if sublists.empty? then
raise "Unexpected List end"
else
- elements << sublists.pop
+ lst = sublists.pop()
+ if not sublists.empty? then
+ sublists.last().append(lst)
+ else
+ elements << lst
+ end
end
elsif token.is_a?(SExpr) then
if not sublists.empty? then
@@ -341,7 +346,7 @@
end
if ARGV.empty?() then
- lexer = SExpr::Lexer.new("a (b 1.5)")
+ lexer = SExpr::Lexer.new("(pingus-level a (b 1.5) 5)")
puts lexer.parse()
else
ARGV.each{|filename|
_______________________________________________
pingus-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/pingus-cvs