Treatment of empty parameterList and expressionList

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Treatment of empty parameterList and expressionList

Anjum
Hi,

The CompilationEngine that I have written does not output an empty parameterList or expressionList tag if there are no parameters or lists of expressions.

However, the sample XML files seem to always place an empty parameterList or expressionList tag in these cases - which means when I run the TextComparator I get failures.

Is this behaviour a must - i.e. can I stick to my implementation or will I run into problems in later chapters if I do not emit empty tags for these cases?

Thanks in advance.
Anjum.
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of empty parameterList and expressionList

cadet1620
Administrator
The XML output is not used after chapter 10, so I don't think that it will be a problem.  In chapter 11, the result of the argument evaluations in the expressionList will be left on the stack in the order the arguments are encountered; there is nothing on the stack that corresponds to the parameterList and expressionList tags.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Treatment of empty parameterList and expressionList

Anjum
Thanks for fast response Mark.

I decided to conform to the expected XML output to make my testing easier using the TextComparator tool. It was a simple enough change in the end - I was just curious to know whether there was a subtle reason for emitting empty tags.

Thanks again for the clarification.
Anjum.