problems with java generation in ragel 6.x trunk

Stephen Bannasch stephen.banna... at deanbrook.org
Mon Mar 24 05:23:51 UTC 2008


I'm working on getting Hpricot to work using trunk ragel. Right now 
I'm getting lots of undefined Symbols.

Any ideas on where to start fixing this would be great.

It does work with ragel 5.25.

Here's how the java file is being produced:

ragel -J -o ext/hpricot_scan/HpricotScanService.java 
ext/hpricot_scan/hpricot_scan.java.rl

Here's the Java compiler invocation:

javac -source 1.4 -target 1.4 -cp 
.:/Users/stephen/dev/junit4.1::/Users/stephen/dev/jruby_trunk/jruby/lib/bsf.jar:/Users/stephen/dev/jruby_trunk/jruby/lib/jruby-complete.jar:/Users/stephen/dev/jruby_trunk/jruby/lib/jruby.jar:/Users/stephen/dev/jruby_trunk/jruby/lib/lucene-core-2.2.0.jar 
HpricotScanService.java

----------------------------------------------------------

The errors start with a series of these:

HpricotScanService.java:821: cannot find symbol
symbol  : variable ts
location: class HpricotScanService
	ts = -1;
         ^
HpricotScanService.java:822: cannot find symbol
symbol  : variable te
location: class HpricotScanService
	te = -1;
         ^

Here's the Java source code:

// line 819 "ext/hpricot_scan/HpricotScanService.java"
	{
	cs = hpricot_scan_start;
	ts = -1;
	te = -1;
	act = 0;
	}

----------------------------------------------------------

Here are some more errors:

HpricotScanService.java:1086: cannot find symbol
symbol  : variable te
location: class HpricotScanService
	{{p = ((te))-1;}{ TEXT_PASS(); }}
                 ^
HpricotScanService.java:1086: illegal start of type
	{{p = ((te))-1;}{ TEXT_PASS(); }}
                ^
HpricotScanService.java:1086: illegal start of type
	{{p = ((te))-1;}{ TEXT_PASS(); }}


And here's the code around line 1086:

	case 30:
// line 56 "ext/hpricot_scan/hpricot_scan.java.rl"
	{{p = ((te))-1;}{ TEXT_PASS(); }}
	break;


----------------------------------------------------------


HpricotScanService.java:1210: cannot find symbol
symbol  : variable eof
location: class HpricotScanService

And here's the code:

case 4:
	if ( p == eof )
	{
	if ( _hpricot_scan_eof_trans[cs] > 0 ) {
		_trans = _hpricot_scan_eof_trans[cs] - 1;
		_goto_targ = 3;
		continue _goto;
	}
	}
	if ( p == eof )



More information about the ragel-users mailing list