Hi everyone,<div><br></div><div>I am starting to use Ragel and I do need some help from you guys. This is main.rl ( <a href="http://pastebin.com/vbinzrYg">http://pastebin.com/vbinzrYg</a> ), a Ragel + C simple program to parse numbers according to this grammar <b>[0-9]+ ( '.' [0-9]+ )?;</b> . The problem is that I am not able to get success parsing of correct inputs using it.</div>
<div><br></div><div>This is the way I compile it :</div><div><div><i>ragel -F0 main.rl</i></div><div><i>gcc -ggdb main.c -o main</i></div></div><div><br></div><div>This is how I execute the program :</div><div><div><i>$./main input.txt </i></div>
<div><i><br></i></div><div>And this is the result : (please note that in the line is where is executed the <i>%write init</i> and<i> %write exec </i>Ragel code)</div><div><i>cs:  0</i></div><div><i>integer_first_final:  3</i></div>
<div><i>-----------</i></div><div><i>cs:  0</i></div><div><i>integer_first_final:  3</i></div><div><i>integer_error</i></div><div><i>Parsing "input.txt"... Failed!</i></div></div><div><br></div><div><div>$cat input.txt </div>
<div><i>1.1</i></div></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">The CS variable is having an mysterious behavior. I would appreciate any kind of help or guidance. Thanks.</div>
<div><br></div><div>Best,</div><div>Luis Martin Gil</div><meta http-equiv="content-type" content="text/html; charset=utf-8">