<div dir="ltr">Consider an x-expression that represents an XML tag, so it has the general form<div><br></div><div style>'(tag ((attr-name "attr-value") ... ) content ...)</div><div style><br></div><div style>
The attributes or content might be omitted, of course.</div><div style><br></div><div style>When I recursively process these expressions, I start by decomposing the x-expression into components:</div><div style><br></div>
<div style>tag</div><div style>((attr-name "attr-value") ... )<br></div><div style>(content ...)</div><div style><br></div><div style>The problem that surfaces in a recursive-processing context is that the list of content might have the same form as an attribute expression, e.g., </div>
<div style><br></div><div style>((field-1 "value-1") (field-2 "value-2"))</div><div style>((p "some text") (p "some more text"))</div><div style><br></div><div style><b>Is there a test I could use to reliably disambiguate between these two cases</b>, short of creating a new struct for x-expressions? Seems like I'm overlooking some middle ground.<br>
</div><div style><br></div><div style><br></div></div>