Revision: 7102
http://playerstage.svn.sourceforge.net/playerstage/?rev=7102&view=rev
Author: gerkey
Date: 2008-10-16 16:22:39 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
Updated Saphira parser for latest batch of .p files
Modified Paths:
--------------
code/player/trunk/server/codetools/saphconv/mktypedef.tcl
code/player/trunk/server/codetools/saphconv/parseparam.tcl
Modified: code/player/trunk/server/codetools/saphconv/mktypedef.tcl
===================================================================
--- code/player/trunk/server/codetools/saphconv/mktypedef.tcl 2008-10-16
08:57:01 UTC (rev 7101)
+++ code/player/trunk/server/codetools/saphconv/mktypedef.tcl 2008-10-16
16:22:39 UTC (rev 7102)
@@ -32,9 +32,17 @@
continue
}
set name [lindex $line 0]
+ if {![string compare $name "Section"]} { continue; }
if {![string compare $name "SonarUnit"]} {incr sonarnum; continue; }
set value [lindex $line 1]
+ # If we determine the value to begin with ;, then the file doesn't give
+ # a value (a apparently newly allowed syntatic construct in a .p file).
+ # So we'll assume that an empty string is appropriate.
+ if {![string compare [string index $value 0] "\;"]} {
+ set value ""
+ }
+
set vars($name) $value
}
@@ -64,6 +72,7 @@
if {![string compare $name Class] ||
![string compare $name LaserPort] ||
![string compare $name LaserIgnore] ||
+ ![string compare $name Map] ||
![string compare $name Subclass]} {
puts " char* ${name};"
} elseif {![string compare $value true] ||
Modified: code/player/trunk/server/codetools/saphconv/parseparam.tcl
===================================================================
--- code/player/trunk/server/codetools/saphconv/parseparam.tcl 2008-10-16
08:57:01 UTC (rev 7101)
+++ code/player/trunk/server/codetools/saphconv/parseparam.tcl 2008-10-16
16:22:39 UTC (rev 7102)
@@ -33,6 +33,7 @@
continue
}
set name [lindex $line 0]
+ if {![string compare $name "Section"]} { continue; }
if {![string compare $name "SonarUnit"]} {incr sonarnum; continue; }
set value [lindex $line 1]
@@ -107,6 +108,7 @@
if {![string compare $name Class] ||
![string compare $name Subclass] ||
![string compare $name LaserPort] ||
+ ![string compare $name Map] ||
![string compare $name LaserIgnore]} {
puts -nonewline "\""
}
@@ -117,6 +119,7 @@
if {![string compare $name Class] ||
![string compare $name Subclass] ||
![string compare $name LaserPort] ||
+ ![string compare $name Map] ||
![string compare $name LaserIgnore]} {
puts -nonewline "\""
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit