<div dir="ltr">It can be pretty tricky to figure out what's wrong with a grammar, in particular if the parser generator doesn't have support for emitting various kinds of debug information. Here are some links that might help you:<div><a href="http://www.tldp.org/HOWTO/Lex-YACC-HOWTO-7.html">http://www.tldp.org/HOWTO/Lex-YACC-HOWTO-7.html</a><br></div><div><a href="http://www.cs.man.ac.uk/~pjj/cs211/ho/node7.html">http://www.cs.man.ac.uk/~pjj/cs211/ho/node7.html</a><br></div><div><a href="http://dinosaur.compilertools.net/bison/bison_11.html">http://dinosaur.compilertools.net/bison/bison_11.html</a></div><div><br></div><div>You might want to consider porting the grammar to Bison (which has better debugging support) and use that instead for the development/debugging phase, then port it back to yecc for the final implementation when done.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br>        /Richard</div></div>
<br><div class="gmail_quote">2017-02-05 7:49 GMT+01:00 Walter Weinmann <span dir="ltr"><<a href="mailto:walter.weinmann@gmail.com" target="_blank">walter.weinmann@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've done a project with he <a href="http://opencypher/openCypher" target="_blank">OpenCypher</a> language: <a href="https://github.com/walter-weinmann/ocparse" target="_blank">https://github.com/<wbr>walter-weinmann/ocparse</a><a href="https://github.com/walter-weinmann/ocparse" target="_blank">https:/<wbr>/github.com/walter-weinmann/<wbr>ocparse</a>. This should be a good example how to apply leex and yecc.<div><br><div>I've done also a second one, but honestly I'm very unhappy with the limitations of LALR parsing. I'm now in the process to switch to <a href="http://seancribbs/neotoma" target="_blank">neotoma</a>, which is based on Parser Expression Grammars and it looks very promising.</div><div><br></div><div>Regards</div><div><br></div><div>Walter<br><div><div><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 5 February 2017 at 00:45, Hugo Mills <span dir="ltr"><<a href="mailto:hugo@carfax.org.uk" target="_blank">hugo@carfax.org.uk</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">   I'm in the process of writing a domain-specific language, using a<br>
custom lexer and a yecc parser. In the process of attempting to add a<br>
new feature to the grammar, I've managed to break what appears to me<br>
to be a completely unrelated piece of the grammar: I'm adding a<br>
structure similar to a list comprehension, and suddenly the integer<br>
comparison operators have stopped working in one group of cases.<br>
<br>
   What approaches are there for debugging this kind of problem? The<br>
best I can some up with is inspection of the .yrl source in detail,<br>
but that's not helping. How else can I work out what the issue is?<br>
<br>
   Obviously, I could post the grammar here for inspection by more<br>
experienced minds than mine, but I'd prefer to find better tooling and<br>
techniques rather than mere appeal to higher authority...<br>
<span class="m_3197172974016752538HOEnZb"><font color="#888888"><br>
   Hugo.<br>
<br>
--<br>
Hugo Mills             | Strive for apathy!<br>
hugo@... <a href="http://carfax.org.uk" rel="noreferrer" target="_blank">carfax.org.uk</a> |<br>
<a href="http://carfax.org.uk/" rel="noreferrer" target="_blank">http://carfax.org.uk/</a>  |<br>
PGP: E2AB1DE4          |                                      Andrew Zalotocky<br>
</font></span><br></div></div>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div><div class="m_3197172974016752538gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><a value="+41618269006" style="font-family:Arial,sans-serif;font-size:10.6667px;color:rgb(17,85,204)"><span style="color:rgb(34,34,34);font-size:10.6667px">______________________________<wbr>____</span><br style="color:rgb(34,34,34);font-size:10.6667px"></a></div></div></div></div></div></div></div>
</div></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>