Aether~<p>Fedi, I have a <a href="https://plasmatrap.com/tags/ComputerScience" rel="nofollow noopener" target="_blank">#ComputerScience</a> (maybe <a href="https://plasmatrap.com/tags/Linguistics" rel="nofollow noopener" target="_blank">#Linguistics</a> ?) Question I need your lovely guidance for ❤️:boosts_ok_gay:💙<span><br><br>I have a design problem about grammar ambiguity ish stuff and want to find reading, resources or theory I can check out to come up with an elegant solution.<br><br>Particularly, I'm trying to find good alternatives to cases when a given word can appear in multiple parts of the syntax<br><br>An example problem (sorry it's very computery): I have two strings (or lists of tokens) I need to combine into a single string, separated by a delimiter, such that both strings can be retrieved again. But, that delimiter can show up in either of the two strings. The standard way to deal with this is to designate an escape token and prepend all instances of the delimiter within the strings with it (eg </span><code>\"</code>). The issue there is now is that any instances of the escape token need escaping too (e.g. <code>\\</code><span>).<br><br>Slightly less work is inserting a repetition of the delimiter any non-delimiting instances of the token. If the delimiter appears twice, it's part of a string, and the only non-repeating delimiter must be the real one. This can look ugly if the delimiter is long though.<br><br>Another crazy option would be interlacing the two strings so all even tokens belong to string 1 and odd ones are string 2. This would obviously look horrible, but maybe there are other solutions taking a similar thought process.<br><br>That's just the most basic case I'm interested in, there might be heaps of other strategies when you have more restrictions and guarantees on what the tokens might contain.<br><br>So yeah I'm looking for stuff like that so I can figure out good patterns for unambiguous yet elegant grammars. For a tad more context, I'm thinking about command line argument formats, trying to think of the most user friendly ways to handle complex data as a list of arguments.<br><br>Also please boost and let me know if there's hashtags I should include etc </span>:ablobcatheart: <a href="https://plasmatrap.com/tags/CompSci" rel="nofollow noopener" target="_blank">#CompSci</a> <a href="https://plasmatrap.com/tags/programming" rel="nofollow noopener" target="_blank">#programming</a> <a href="https://plasmatrap.com/tags/askfedi" rel="nofollow noopener" target="_blank">#askfedi</a> <a href="https://plasmatrap.com/tags/TechSupport" rel="nofollow noopener" target="_blank">#TechSupport</a> <a href="https://plasmatrap.com/tags/CompSci" rel="nofollow noopener" target="_blank">#CompSci</a> <a href="https://plasmatrap.com/tags/programming" rel="nofollow noopener" target="_blank">#programming</a> <a href="https://plasmatrap.com/tags/askfedi" rel="nofollow noopener" target="_blank">#askfedi</a> <a href="https://plasmatrap.com/tags/TechSupport" rel="nofollow noopener" target="_blank">#TechSupport</a></p>