Segmentation Fault
    Ryan Phelps 
    rmphe... at gmail.com
       
    Mon Dec 17 18:37:24 UTC 2007
    
    
  
rlgen-java gives me a segmentation fault when run on the XML generated
by the following code:
public class SegFault {
  %%{
    machine A;
    write data;
    main := space* '=' [WHAT?!] @{} space*;
  }%%
  private void foo() {
    int cs, p = 0, pe = 0;
    char[] data = null;
    %% write init;
    %% write exec;
  }
  %%{
    machine B;
    write data;
    main := 'blah';
  }%%
  private void bar() {
    int cs, p = 0, pe = 0;
    char[] data = null;
    %% write init;
    %% write exec;
  }
}
This is the most simplified reproduction of the problem that I could
create after discovering it while trying to implement a configuration
file parser. The strange part is that the smallest changes to the
above code will fix it. For example, if I change anything at all with
'main' of machine A (like changing [WHAT?!] to [WHA?!], using "space"
instead of "space*", or getting rid of the empty action), rlgen-java
will work fine. If I rename machine A to machine S it works fine. If I
get rid of machine B it works fine.
    
    
More information about the ragel-users
mailing list