<div dir="ltr">It's interesting undocumented feature. I played with go examples and I got very discouraging behaviour.<div><br></div><div style>Example 1.</div><div style><br></div><div style>atoi.go:</div><div style>...</div>
<div style>//line atoi.rl:34</div><div style> neg = ttrue // I change 'true' to 'ttrue' to make error message</div><div style>    case 1:</div><div style>//line atoi.rl:35</div><div style><br></div><div style>
val = val * 10 + (int(data[p]) - '0')</div><div style>...</div><div style><br></div><div style>I run `go run atoi.go` and I got following message:</div><div style><div><br></div><div># command-line-arguments</div>
<div>atoi.rl:34[/home/antage/workspace/ragel-go/examples/go/atoi.go:163]: undefined: ttrue</div><div><br></div><div style>It's looking fine.</div><div style><br></div><div style>Example 2.</div><div style><br></div><div style>
atoi.go:</div><div style><div>...</div><div>//line atoi.rl:34</div><div><br></div><div> neg = ttrue // I change 'true' to 'ttrue' to make error message</div><div>    case 1:</div><div>//line atoi.rl:35</div>
<div><br></div><div>val = val * 10 + (int(data[p]) - '0')</div><div>...</div><div><br></div><div>I just add empty line after '//line atoi.rl:34' directive.</div><div style>I got following message:</div><div style>
<br></div><div style><div># command-line-arguments</div><div>atoi.rl:35[/home/antage/workspace/ragel-go/examples/go/atoi.go:164]: undefined: ttrue</div><div><br></div><div style>It's not fine. Error isn't at atoi.rl:35, it's at atoi.rl:34.</div>
<div style><br></div><div style>Ragel generates a lot of empty lines when embedding an action code. So we can't rely on '//line' directive to locate errors in .rl files.</div><div style><br></div></div></div></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 28, 2013 at 1:38 AM, Folke B. <span dir="ltr"><<a href="mailto:messias@gmail.com" target="_blank">messias@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi<div><br></div><div>I was wondering if Ragel could emit line directives in a format that is understood by the Go compiler. The format is "\n//line path/to/file.rl:123\n". (Note that it has to start at column 1.)</div>


<div><br></div><div>Thanks,</div><div>Folke</div><div><br></div><div>PS: Ragel is awesome!</div><div><br></div></div>
<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><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>WBR, Anton
</div>