[Bug 557] New: Parser should be more picky about what it accepts

For more infomation about this bug, visit
Summary: Parser should be more picky about what it accepts
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Scripting
AssignedTo: orocos-dev [..] ...
ReportedBy: klaas [dot] gadeyne [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

See

We discovered that the symptoms that are described in the above thread are due
to a bug in the scripting. Indeed [in the above case], when loading the above
script, the used component are not yet peers of the deployment component (this
happens only after the configureComponent() command *in* the script. This
should result in an error. However, currently the net result is that the
deployment component tries to execute these methods onto itself, hence the
'false' return and the program ending up in an error state.

[Bug 557] Parser should be more picky about what it accepts

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #2 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-26 22:44:30 ---
When you wrote in Mytask, with peer 'otherTask':

otherTak.start(); // note the mis-spelling

It would invoke 'start()' on 'Mytask' instead of complaining about the name not
being found. This was both in the TaskBrowser as in scripts.

That bug must have been in there for almost a year or so. This must have bitten
more users, but it's such a confusing behavior that no-one probably succeeded
in pinpointing it.

$ svn ci src/scripting/ -m"Fix bug #557: Parser should be more picky about what
it accepts. Applied patch and tested. Sorry users for this *very* confusing
behavior."
Sending src/scripting/CommandParser.cpp
Sending src/scripting/PeerParser.cpp
Sending src/scripting/ValueParser.cpp
Transmitting file data ...
Committed revision 29324.

[Bug 557] Parser should be more picky about what it accepts

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|orocos- |peter [dot] soetens [..] ...
|dev [..] ... |

--- Comment #1 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-26 22:39:51 ---
Created an attachment (id=305)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=305)
Fixes this issue for the parser when processing scripts.

Part one of the patch. A default constructor argument did not get set correctly
when necessary + the implementation did not respect the API docs (was not
returning 0 when nothing was found).