11 if ( top == stack_size ) {
12 System.out.print( "growing stack\n" );
14 // Don't actually bother to resize here, but we do print messages.
15 //stack = (int*)realloc( stack, sizeof(int)*stack_size );
20 if ( stack_size > (top * 4) ) {
22 // Don't actually bother to resize here, but we do print messages.
23 //stack = (int*)realloc( stack, sizeof(int)*stack_size );
24 System.out.print( "shrinking stack\n" );
28 action item_start { item = p; }
32 String item_data = new String ( data, item, p-item );
33 System.out.print( "item: " );
34 System.out.print( item_data );
35 System.out.print( "\n" );
40 System.out.print( "calling main\n" );
47 System.out.print( "STRAY CLOSE\n" );
51 System.out.print( "returning from main\n" );
62 ( number | id ) >item_start %item_finish |
72 static void test( char data[] )
74 int cs, p = 0, pe = data.length, eof = data.length, item = 0;
75 int stack[] = new int[1024];
82 if ( cs == recdescent_error )
83 System.out.println( "SCANNER ERROR" );
86 public static void main( String args[] )
88 test( "88 foo { 99 {{{{}}}}{ } }".toCharArray() );
89 test( "76 } sadf".toCharArray() );