<div dir="ltr">Ragel defines constant "[machine name]_first_final" (where "[machine name]" is a name specified in directive "machine [machine name]").<div><br></div><div>You could rewrite the code to use this constant:<br>
</div><div><br></div><div>%%{<br></div><div>  machine sdp;</div><div><br></div><div>// the machine definitions are here </div><div>....</div><div>}%%</div><div><br></div><div>...</div><div>// go code</div><div><br></div><div>
if cs != sdp_first_final {</div><div>...</div><div>}</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 3:57 AM, Iñaki Baz Castillo <span dir="ltr"><<a href="mailto:ibc@aliax.net" target="_blank">ibc@aliax.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The following code in Go:<br>
<br>
-----------------<br>
  if cs != %%{ write first_final; }%% {<br>
-----------------<br>
<br>
generates the following lines in the .go file:<br>
<br>
-----------------<br>
  if cs !=<br>
// line 12549 "SDP.go"<br>
461<br>
// line 79 "SDP.rl"<br>
 {<br>
-----------------<br>
<br>
This produces, of course, a syntax error in Go:<br>
<br>
sdp/SDP.go:12549: missing condition in if statement<br>
sdp/SDP.go:12549: cs != 461 evaluated but not used<br>
<br>
<br>
<br>
$ ragel -v<br>
Ragel State Machine Compiler version 6.8 Feb 2013<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Iñaki Baz Castillo<br>
<<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>><br>
<br>
_______________________________________________<br>
ragel-users mailing list<br>
<a href="mailto:ragel-users@complang.org">ragel-users@complang.org</a><br>
<a href="http://www.complang.org/mailman/listinfo/ragel-users" target="_blank">http://www.complang.org/mailman/listinfo/ragel-users</a></font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>WBR, Anton
</div>