ext/parseoptions.c
void
rlink_init_parseoptions(void)
{
#ifdef FOR_RDOC
	rlink_mLinkParser = rb_define_module( "LinkParser" );
	rlink_eLpError = rb_define_class_under( rlink_mLinkParser, "Error", rb_eRuntimeError );
#endif
	
	rlink_cParseOptions = rb_define_class_under( rlink_mLinkParser, 
		"ParseOptions", rb_cObject );

	rb_define_alloc_func( rlink_cParseOptions, rlink_parseopts_s_alloc );
	rb_define_method( rlink_cParseOptions, "initialize", rlink_parseopts_init, -1 );
/*
	rb_define_method( rlink_cParseOptions, "merge", rlink_parseopts_merge, 1 );
	rb_define_method( rlink_cParseOptions, "merge!", rlink_parseopts_merge_bang, 1 );
*/
	rb_define_method( rlink_cParseOptions, "verbosity=", 
		rlink_parseopts_set_verbosity, 1 );
	rb_define_method( rlink_cParseOptions, "verbosity", 
		rlink_parseopts_get_verbosity, 0 );
	rb_define_method( rlink_cParseOptions, "linkage_limit=", 
		rlink_parseopts_set_linkage_limit, 1 );
	rb_define_method( rlink_cParseOptions, "linkage_limit", 
		rlink_parseopts_get_linkage_limit, 0 );
	rb_define_method( rlink_cParseOptions, "disjunct_cost=", 
		rlink_parseopts_set_disjunct_cost, 1 );
	rb_define_method( rlink_cParseOptions, "disjunct_cost", 
		rlink_parseopts_get_disjunct_cost, 0 );
	rb_define_method( rlink_cParseOptions, "min_null_count=", 
		rlink_parseopts_set_min_null_count, 1 );
	rb_define_method( rlink_cParseOptions, "min_null_count", 
		rlink_parseopts_get_min_null_count, 0 );
	rb_define_method( rlink_cParseOptions, "max_null_count=", 
		rlink_parseopts_set_max_null_count, 1 );
	rb_define_method( rlink_cParseOptions, "max_null_count", 
		rlink_parseopts_get_max_null_count, 0 );
	rb_define_method( rlink_cParseOptions, "null_block=", 
		rlink_parseopts_set_null_block, 1 );
	rb_define_method( rlink_cParseOptions, "null_block", 
		rlink_parseopts_get_null_block, 0 );
	rb_define_method( rlink_cParseOptions, "islands_ok=", 
		rlink_parseopts_set_islands_ok, 1 );
	rb_define_method( rlink_cParseOptions, "islands_ok?", 
		rlink_parseopts_get_islands_ok_p, 0 );
	rb_define_method( rlink_cParseOptions, "short_length=", 
		rlink_parseopts_set_short_length, 1 );
	rb_define_method( rlink_cParseOptions, "short_length", 
		rlink_parseopts_get_short_length, 0 );
	rb_define_method( rlink_cParseOptions, "max_memory=", 
		rlink_parseopts_set_max_memory, 1 );
	rb_define_method( rlink_cParseOptions, "max_memory", 
		rlink_parseopts_get_max_memory, 0 );
	rb_define_method( rlink_cParseOptions, "max_sentence_length=", 
		rlink_parseopts_set_max_sentence_length, 1 );
	rb_define_method( rlink_cParseOptions, "max_sentence_length", 
		rlink_parseopts_get_max_sentence_length, 0 );
	rb_define_method( rlink_cParseOptions, "max_parse_time=", 
		rlink_parseopts_set_max_parse_time, 1 );
	rb_define_method( rlink_cParseOptions, "max_parse_time", 
		rlink_parseopts_get_max_parse_time, 0 );
	rb_define_method( rlink_cParseOptions, "screen_width=", 
		rlink_parseopts_set_screen_width, 1 );
	rb_define_method( rlink_cParseOptions, "screen_width", 
		rlink_parseopts_get_screen_width, 0 );
	rb_define_method( rlink_cParseOptions, "allow_null=", 
		rlink_parseopts_set_allow_null, 1 );
	rb_define_method( rlink_cParseOptions, "allow_null?", 
		rlink_parseopts_get_allow_null_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_walls=", 
		rlink_parseopts_set_display_walls, 1 );
	rb_define_method( rlink_cParseOptions, "display_walls?", 
		rlink_parseopts_get_display_walls_p, 0 );
	rb_define_method( rlink_cParseOptions, "all_short_connectors=", 
		rlink_parseopts_set_all_short_connectors, 1 );
	rb_define_method( rlink_cParseOptions, "all_short_connectors?", 
		rlink_parseopts_get_all_short_connectors_p, 0 );
	rb_define_method( rlink_cParseOptions, "cost_model_type=", 
		rlink_parseopts_set_cost_model_type, 1 );

/*  (No way to get the cost_model_type from the API)

	rb_define_method( rlink_cParseOptions, "cost_model_type", 
		rlink_parseopts_get_cost_model_type, 0 );
*/
	rb_define_method( rlink_cParseOptions, "batch_mode=", 
		rlink_parseopts_set_batch_mode, 1 );
	rb_define_method( rlink_cParseOptions, "batch_mode?", 
		rlink_parseopts_get_batch_mode_p, 0 );
	rb_define_method( rlink_cParseOptions, "panic_mode=", 
		rlink_parseopts_set_panic_mode, 1 );
	rb_define_method( rlink_cParseOptions, "panic_mode?", 
		rlink_parseopts_get_panic_mode_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_on=", 
		rlink_parseopts_set_display_on, 1 );
	rb_define_method( rlink_cParseOptions, "display_on?", 
		rlink_parseopts_get_display_on_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_postscript=", 
		rlink_parseopts_set_display_postscript, 1 );
	rb_define_method( rlink_cParseOptions, "display_postscript?", 
		rlink_parseopts_get_display_postscript_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_constituents=", 
		rlink_parseopts_set_display_constituents, 1 );
	rb_define_method( rlink_cParseOptions, "display_constituents?", 
		rlink_parseopts_get_display_constituents_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_bad=", 
		rlink_parseopts_set_display_bad, 1 );
	rb_define_method( rlink_cParseOptions, "display_bad?", 
		rlink_parseopts_get_display_bad_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_links=", 
		rlink_parseopts_set_display_links, 1 );
	rb_define_method( rlink_cParseOptions, "display_links?", 
		rlink_parseopts_get_display_links_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_union=", 
		rlink_parseopts_set_display_union, 1 );
	rb_define_method( rlink_cParseOptions, "display_union?", 
		rlink_parseopts_get_display_union_p, 0 );
	rb_define_method( rlink_cParseOptions, "echo_on=", 
		rlink_parseopts_set_echo_on, 1 );
	rb_define_method( rlink_cParseOptions, "echo_on?", 
		rlink_parseopts_get_echo_on_p, 0 );



/*
	rlink_parseopts_timer_expired
	rlink_parseopts_memory_exhausted
	rlink_parseopts_resources_exhausted
	rlink_parseopts_reset_resources
*/
}
/*
 * LinkParser parse options class. Instances of this class are used to specify the different
 * parameters that are used to parse sentences. Examples of the kinds of things that are
 * controlled by ParseOptions include maximum parsing time and memory, whether to use
 * null-links, and whether or not to use "panic" mode. This data structure is passed in to
 * the various parsing and printing routines along with the sentence.
 *
 */
LinkParser parse options class. Instances of this class are used to specify the different
parameters that are used to parse sentences. Examples of the kinds of things that are
controlled by ParseOptions include maximum parsing time and memory, whether to use
null-links, and whether or not to use "panic" mode. This data structure is passed in to
the various parsing and printing routines along with the sentence.
LinkParser parse options class . Instances of this class are used to specify the different parameters that are used to parse sentences . Examples of the kinds of things that are controlled by ParseOptions include maximum parsing time and memory whether to use null - links and whether or not to use " panic " mode . This data structure is passed in to the various parsing and printing routines along with the sentence .
void
rlink_init_parseoptions(void)
{
#ifdef FOR_RDOC
	rlink_mLinkParser = rb_define_module( "LinkParser" );
	rlink_eLpError = rb_define_class_under( rlink_mLinkParser, "Error", rb_eRuntimeError );
#endif
	rlink_cParseOptions = rb_define_class_under( rlink_mLinkParser, 
		"ParseOptions", rb_cObject );
	rb_define_alloc_func( rlink_cParseOptions, rlink_parseopts_s_alloc );
	rb_define_method( rlink_cParseOptions, "initialize", rlink_parseopts_init, -1 );
	rb_define_method( rlink_cParseOptions, "verbosity=", 
		rlink_parseopts_set_verbosity, 1 );
	rb_define_method( rlink_cParseOptions, "verbosity", 
		rlink_parseopts_get_verbosity, 0 );
	rb_define_method( rlink_cParseOptions, "linkage_limit=", 
		rlink_parseopts_set_linkage_limit, 1 );
	rb_define_method( rlink_cParseOptions, "linkage_limit", 
		rlink_parseopts_get_linkage_limit, 0 );
	rb_define_method( rlink_cParseOptions, "disjunct_cost=", 
		rlink_parseopts_set_disjunct_cost, 1 );
	rb_define_method( rlink_cParseOptions, "disjunct_cost", 
		rlink_parseopts_get_disjunct_cost, 0 );
	rb_define_method( rlink_cParseOptions, "min_null_count=", 
		rlink_parseopts_set_min_null_count, 1 );
	rb_define_method( rlink_cParseOptions, "min_null_count", 
		rlink_parseopts_get_min_null_count, 0 );
	rb_define_method( rlink_cParseOptions, "max_null_count=", 
		rlink_parseopts_set_max_null_count, 1 );
	rb_define_method( rlink_cParseOptions, "max_null_count", 
		rlink_parseopts_get_max_null_count, 0 );
	rb_define_method( rlink_cParseOptions, "null_block=", 
		rlink_parseopts_set_null_block, 1 );
	rb_define_method( rlink_cParseOptions, "null_block", 
		rlink_parseopts_get_null_block, 0 );
	rb_define_method( rlink_cParseOptions, "islands_ok=", 
		rlink_parseopts_set_islands_ok, 1 );
	rb_define_method( rlink_cParseOptions, "islands_ok?", 
		rlink_parseopts_get_islands_ok_p, 0 );
	rb_define_method( rlink_cParseOptions, "short_length=", 
		rlink_parseopts_set_short_length, 1 );
	rb_define_method( rlink_cParseOptions, "short_length", 
		rlink_parseopts_get_short_length, 0 );
	rb_define_method( rlink_cParseOptions, "max_memory=", 
		rlink_parseopts_set_max_memory, 1 );
	rb_define_method( rlink_cParseOptions, "max_memory", 
		rlink_parseopts_get_max_memory, 0 );
	rb_define_method( rlink_cParseOptions, "max_sentence_length=", 
		rlink_parseopts_set_max_sentence_length, 1 );
	rb_define_method( rlink_cParseOptions, "max_sentence_length", 
		rlink_parseopts_get_max_sentence_length, 0 );
	rb_define_method( rlink_cParseOptions, "max_parse_time=", 
		rlink_parseopts_set_max_parse_time, 1 );
	rb_define_method( rlink_cParseOptions, "max_parse_time", 
		rlink_parseopts_get_max_parse_time, 0 );
	rb_define_method( rlink_cParseOptions, "screen_width=", 
		rlink_parseopts_set_screen_width, 1 );
	rb_define_method( rlink_cParseOptions, "screen_width", 
		rlink_parseopts_get_screen_width, 0 );
	rb_define_method( rlink_cParseOptions, "allow_null=", 
		rlink_parseopts_set_allow_null, 1 );
	rb_define_method( rlink_cParseOptions, "allow_null?", 
		rlink_parseopts_get_allow_null_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_walls=", 
		rlink_parseopts_set_display_walls, 1 );
	rb_define_method( rlink_cParseOptions, "display_walls?", 
		rlink_parseopts_get_display_walls_p, 0 );
	rb_define_method( rlink_cParseOptions, "all_short_connectors=", 
		rlink_parseopts_set_all_short_connectors, 1 );
	rb_define_method( rlink_cParseOptions, "all_short_connectors?", 
		rlink_parseopts_get_all_short_connectors_p, 0 );
	rb_define_method( rlink_cParseOptions, "cost_model_type=", 
		rlink_parseopts_set_cost_model_type, 1 );
	rb_define_method( rlink_cParseOptions, "batch_mode=", 
		rlink_parseopts_set_batch_mode, 1 );
	rb_define_method( rlink_cParseOptions, "batch_mode?", 
		rlink_parseopts_get_batch_mode_p, 0 );
	rb_define_method( rlink_cParseOptions, "panic_mode=", 
		rlink_parseopts_set_panic_mode, 1 );
	rb_define_method( rlink_cParseOptions, "panic_mode?", 
		rlink_parseopts_get_panic_mode_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_on=", 
		rlink_parseopts_set_display_on, 1 );
	rb_define_method( rlink_cParseOptions, "display_on?", 
		rlink_parseopts_get_display_on_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_postscript=", 
		rlink_parseopts_set_display_postscript, 1 );
	rb_define_method( rlink_cParseOptions, "display_postscript?", 
		rlink_parseopts_get_display_postscript_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_constituents=", 
		rlink_parseopts_set_display_constituents, 1 );
	rb_define_method( rlink_cParseOptions, "display_constituents?", 
		rlink_parseopts_get_display_constituents_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_bad=", 
		rlink_parseopts_set_display_bad, 1 );
	rb_define_method( rlink_cParseOptions, "display_bad?", 
		rlink_parseopts_get_display_bad_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_links=", 
		rlink_parseopts_set_display_links, 1 );
	rb_define_method( rlink_cParseOptions, "display_links?", 
		rlink_parseopts_get_display_links_p, 0 );
	rb_define_method( rlink_cParseOptions, "display_union=", 
		rlink_parseopts_set_display_union, 1 );
	rb_define_method( rlink_cParseOptions, "display_union?", 
		rlink_parseopts_get_display_union_p, 0 );
	rb_define_method( rlink_cParseOptions, "echo_on=", 
		rlink_parseopts_set_echo_on, 1 );
	rb_define_method( rlink_cParseOptions, "echo_on?", 
		rlink_parseopts_get_echo_on_p, 0 );
}
void rlink_init_parseoptions ( void ) { #ifdef FOR_RDOC rlink_mLinkParser = rb_define_module ( " " ) ; rlink_eLpError = rb_define_class_under ( rlink_mLinkParser , " " , rb_eRuntimeError ) ; #endif rlink_cParseOptions = rb_define_class_under ( rlink_mLinkParser , " " , rb_cObject ) ; rb_define_alloc_func ( rlink_cParseOptions , rlink_parseopts_s_alloc ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_init , -1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_verbosity , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_verbosity , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_linkage_limit , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_linkage_limit , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_disjunct_cost , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_disjunct_cost , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_min_null_count , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_min_null_count , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_max_null_count , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_max_null_count , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_null_block , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_null_block , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_islands_ok , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_islands_ok_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_short_length , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_short_length , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_max_memory , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_max_memory , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_max_sentence_length , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_max_sentence_length , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_max_parse_time , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_max_parse_time , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_screen_width , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_screen_width , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_allow_null , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_allow_null_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_walls , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_walls_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_all_short_connectors , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_all_short_connectors_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_cost_model_type , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_batch_mode , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_batch_mode_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_panic_mode , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_panic_mode_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_on , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_on_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_postscript , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_postscript_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_constituents , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_constituents_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_bad , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_bad_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_links , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_links_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_display_union , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_display_union_p , 0 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_set_echo_on , 1 ) ; rb_define_method ( rlink_cParseOptions , " " , rlink_parseopts_get_echo_on_p , 0 ) ; }
LinkParser parse options class.
LinkParser parse options class .
/*
	rb_define_method( rlink_cParseOptions, "merge", rlink_parseopts_merge, 1 );
	rb_define_method( rlink_cParseOptions, "merge!", rlink_parseopts_merge_bang, 1 );
*/ /*  (No way to get the cost_model_type from the API)

	rb_define_method( rlink_cParseOptions, "cost_model_type", 
		rlink_parseopts_get_cost_model_type, 0 );
*/ /*
	rlink_parseopts_timer_expired
	rlink_parseopts_memory_exhausted
	rlink_parseopts_resources_exhausted
	rlink_parseopts_reset_resources
*/