You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(154) |
Aug
(373) |
Sep
(265) |
Oct
(464) |
Nov
(289) |
Dec
(42) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
(96) |
Mar
(198) |
Apr
(436) |
May
(205) |
Jun
(95) |
Jul
(354) |
Aug
(153) |
Sep
(82) |
Oct
(106) |
Nov
(95) |
Dec
(284) |
2003 |
Jan
(82) |
Feb
(146) |
Mar
(66) |
Apr
(62) |
May
(36) |
Jun
(190) |
Jul
(73) |
Aug
(36) |
Sep
(18) |
Oct
(56) |
Nov
(49) |
Dec
(77) |
2004 |
Jan
(70) |
Feb
(78) |
Mar
(137) |
Apr
(260) |
May
(105) |
Jun
(114) |
Jul
(141) |
Aug
(175) |
Sep
(406) |
Oct
(281) |
Nov
(259) |
Dec
(257) |
2005 |
Jan
(92) |
Feb
(287) |
Mar
(113) |
Apr
(119) |
May
(77) |
Jun
(255) |
Jul
(483) |
Aug
(221) |
Sep
(139) |
Oct
(238) |
Nov
(179) |
Dec
(42) |
2006 |
Jan
(37) |
Feb
(179) |
Mar
(178) |
Apr
(124) |
May
(62) |
Jun
(57) |
Jul
(123) |
Aug
(85) |
Sep
(117) |
Oct
(62) |
Nov
(52) |
Dec
(97) |
2007 |
Jan
(160) |
Feb
(24) |
Mar
(26) |
Apr
(22) |
May
(25) |
Jun
(20) |
Jul
(28) |
Aug
(20) |
Sep
(45) |
Oct
(61) |
Nov
(43) |
Dec
(44) |
2008 |
Jan
(42) |
Feb
(31) |
Mar
(15) |
Apr
(59) |
May
(39) |
Jun
(12) |
Jul
(19) |
Aug
(35) |
Sep
(35) |
Oct
(13) |
Nov
(22) |
Dec
(6) |
2009 |
Jan
(10) |
Feb
(10) |
Mar
(32) |
Apr
(7) |
May
(11) |
Jun
(6) |
Jul
(10) |
Aug
(9) |
Sep
(13) |
Oct
(9) |
Nov
(7) |
Dec
(2) |
2010 |
Jan
(2) |
Feb
(7) |
Mar
(10) |
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(2) |
2011 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(10) |
Jul
(7) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
(1) |
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric B. <er...@us...> - 2001-06-28 12:49:34
|
Update of /cvsroot/gobo-eiffel/gobo/library/pattern/bridge In directory usw-pr-cvs1:/tmp/cvs-serv31684 Added Files: dp_implementation.e Log Message: Implementation in the Bridge Pattern. --- NEW FILE: dp_implementation.e --- indexing description: "Implementation in the Bridge Pattern" library: "Gobo Eiffel Pattern Library" author: "Andreas Leitner <no...@sb...>" copyright: "Copyright (c) 2001, Andreas Leitner and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/28 12:49:31 $" revision: "$Revision: 1.1 $" class DP_IMPLEMENTATION feature {DP_INTERFACE} -- Status report can_implement (an_interface: DP_INTERFACE) is -- Can current implementation implement `an_interface'? require an_interface_not_void: an_interface /= Void do Result := True end feature {DP_INTERFACE} -- Setting implement (an_interface: DP_INTERFACE) is -- Tell current implementation to implement `an_interface'? require an_interface_not_void: an_interface /= Void can_implement: can_implement (an_interface) valid_interface: an_interface.implementation = Current do end end -- class DP_IMPLEMENTATION |
From: Eric B. <er...@us...> - 2001-06-28 12:48:30
|
Update of /cvsroot/gobo-eiffel/gobo/library/pattern/bridge In directory usw-pr-cvs1:/tmp/cvs-serv31269 Added Files: dp_interface.e Log Message: Interface in the Bridge Pattern. --- NEW FILE: dp_interface.e --- indexing description: "Interface in the Bridge Pattern" library: "Gobo Eiffel Pattern Library" author: "Andreas Leitner <no...@sb...>" copyright: "Copyright (c) 2001, Andreas Leitner and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/28 12:48:27 $" revision: "$Revision: 1.1 $" class DP_INTERFACE feature {NONE} -- Initialization make_from_implementation (an_implementation: like implementation) is -- Create a new interface using -- `an_implementation' as implementation. require an_implementation_not_void: an_implementation /= Void valid_implementation: an_implementation.can_implement (Current) do implementation := an_implementation implementation.implement (Current) ensure implementation_set: implementation = an_implementation end feature {DP_IMPLEMENTATION} -- Implementation implementation: DP_IMPLEMENTATION -- Implementation invariant implementation_not_void: implementation /= Void valid_implementation: implementation.can_implement (Current) end -- class DP_INTERFACE |
From: Eric B. <er...@us...> - 2001-06-28 12:47:39
|
Update of /cvsroot/gobo-eiffel/gobo/library/pattern/bridge In directory usw-pr-cvs1:/tmp/cvs-serv31037/bridge Log Message: Directory /cvsroot/gobo-eiffel/gobo/library/pattern/bridge added to the repository |
From: Eric B. <er...@us...> - 2001-06-28 12:47:21
|
Update of /cvsroot/gobo-eiffel/gobo/library/pattern In directory usw-pr-cvs1:/tmp/cvs-serv30931/pattern Log Message: Directory /cvsroot/gobo-eiffel/gobo/library/pattern added to the repository |
From: Sven E. <sv...@us...> - 2001-06-26 19:15:11
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/command In directory usw-pr-cvs1:/tmp/cvs-serv21771/command Modified Files: geant_command.e geant_compile_se_command.e geant_exec_command.e geant_gelex_command.e geant_geyacc_command.e geant_lcc_command.e geant_var_command.e geant_xace_command.e Log Message: implemented is_executable Index: geant_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_command.e 2001/06/26 17:06:51 1.1 --- geant_command.e 2001/06/26 19:15:05 1.2 *************** *** 20,23 **** --- 20,30 ---- feature execute is + require + is_executable : is_executable + deferred + end + + is_executable : BOOLEAN is + -- is object prepared to execute deferred end Index: geant_compile_se_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_compile_se_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_compile_se_command.e 2001/06/26 17:06:51 1.1 --- geant_compile_se_command.e 2001/06/26 19:15:05 1.2 *************** *** 28,34 **** execute is - require - valid_configuration : valid_configuration - local cmd : STRING --- 28,31 ---- *************** *** 44,50 **** end ! valid_configuration : BOOLEAN is do Result := valid_ace_configuration or else valid_traditional_configuration end --- 41,50 ---- end ! is_executable : BOOLEAN is do Result := valid_ace_configuration or else valid_traditional_configuration + ensure then + valid_configuration : Result implies valid_ace_configuration + or else valid_traditional_configuration end *************** *** 52,55 **** --- 52,57 ---- do Result := (ace_file /= void and then ace_file.count > 0) and not valid_traditional_configuration + ensure + Result implies (ace_file /= void and then ace_file.count > 0) and not valid_traditional_configuration end *************** *** 57,60 **** --- 59,66 ---- do Result := + (root_class /= void and then root_class.count > 0) and + (executable /= void and then executable.count > 0) and not valid_ace_configuration + ensure + Result implies (root_class /= void and then root_class.count > 0) and (executable /= void and then executable.count > 0) and not valid_ace_configuration Index: geant_exec_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_exec_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_exec_command.e 2001/06/26 17:06:51 1.1 --- geant_exec_command.e 2001/06/26 19:15:05 1.2 *************** *** 29,35 **** execute is - require - cmd_not_void : cmd /= Void - cmd_not_empty : not cmd.is_empty local sc : UT_SHELL_COMMAND --- 29,32 ---- *************** *** 38,41 **** --- 35,46 ---- !!sc.make(cmd) sc.execute + end + + is_executable : BOOLEAN is + do + Result := cmd /= Void and then not cmd.is_empty + ensure then + cmd_not_void : Result implies cmd /= Void + cmd_not_empty : Result implies not cmd.is_empty end Index: geant_gelex_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_gelex_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_gelex_command.e 2001/06/26 17:06:51 1.1 --- geant_gelex_command.e 2001/06/26 19:15:05 1.2 *************** *** 36,44 **** execute is - require - gelex_input_filename_not_void : gelex_input_filename /= Void - gelex_input_filename_not_empty : not gelex_input_filename.is_empty - meta_ecs implies not full - full implies not meta_ecs local cmd : STRING --- 36,39 ---- *************** *** 104,107 **** --- 99,113 ---- log(" [gelex] " + cmd + "%N") system(cmd) + end + + is_executable : BOOLEAN is + do + Result := gelex_input_filename /= Void and then not gelex_input_filename.is_empty + and ((meta_ecs and not full) or (full and not meta_ecs)) + ensure then + gelex_input_filename_not_void : Result implies gelex_input_filename /= Void + gelex_input_filename_not_empty : Result implies not gelex_input_filename.is_empty + meta_ecs implies not full + full implies not meta_ecs end Index: geant_geyacc_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_geyacc_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_geyacc_command.e 2001/06/26 17:06:51 1.1 --- geant_geyacc_command.e 2001/06/26 19:15:05 1.2 *************** *** 36,42 **** execute is - require - grammar_filename_not_void : grammar_filename /= Void - grammar_filename_not_empty: not grammar_filename.is_empty local cmd : STRING --- 36,39 ---- *************** *** 74,77 **** --- 71,82 ---- log(" [geyacc] " + cmd + "%N") system(cmd) + end + + is_executable : BOOLEAN is + do + Result := grammar_filename /= Void and then not grammar_filename.is_empty + ensure then + grammar_filename_not_void : Result implies grammar_filename /= Void + grammar_filename_not_empty: Result implies not grammar_filename.is_empty end Index: geant_lcc_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_lcc_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_lcc_command.e 2001/06/26 17:06:51 1.1 --- geant_lcc_command.e 2001/06/26 19:15:05 1.2 *************** *** 29,38 **** execute is - require - executable_not_void : executable /= Void - executable_not_empty: not executable.is_empty - - sourcefilename_not_void : sourcefilename /= Void - sourcefilename_not_empty: not sourcefilename.is_empty local cmd : STRING --- 29,32 ---- *************** *** 43,46 **** --- 37,52 ---- log(" [lcc] " + cmd + "%N") system(cmd) + end + + is_executable : BOOLEAN is + do + Result := executable /= Void and then not executable.is_empty + and then sourcefilename /= Void and then not sourcefilename.is_empty + ensure then + executable_not_void : Result implies executable /= Void + executable_not_empty: Result implies not executable.is_empty + + sourcefilename_not_void : Result implies sourcefilename /= Void + sourcefilename_not_empty: Result implies not sourcefilename.is_empty end Index: geant_var_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_var_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_var_command.e 2001/06/26 17:06:51 1.1 --- geant_var_command.e 2001/06/26 19:15:05 1.2 *************** *** 29,39 **** execute is - require - name_not_void : name /= Void - name_not_empty: not name.is_empty - do log(" [var] " + name + "=" + value + "%N") vars.force(name, value) -- put the variable in the pool of global variables end --- 29,43 ---- execute is do log(" [var] " + name + "=" + value + "%N") vars.force(name, value) -- put the variable in the pool of global variables + end + + is_executable : BOOLEAN is + do + Result := name /= Void and then not name.is_empty + ensure then + name_not_void : Result implies name /= Void + name_not_empty: Result implies not name.is_empty end Index: geant_xace_command.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/command/geant_xace_command.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant_xace_command.e 2001/06/26 17:06:51 1.1 --- geant_xace_command.e 2001/06/26 19:15:05 1.2 *************** *** 31,40 **** execute is - require - command_not_void : command /= Void - command_not_empty: not command.is_empty - - command_options_not_void : command_options /= Void - command_options_not_empty: not command_options.is_empty local cmd : STRING --- 31,34 ---- *************** *** 53,56 **** --- 47,62 ---- system(cmd) end + end + + is_executable : BOOLEAN is + do + Result := command /= Void and then not command.is_empty and then + command_options /= Void and then not command_options.is_empty + ensure then + command_not_void : Result implies command /= Void + command_not_empty: Result implies not command.is_empty + + command_options_not_void : Result implies command_options /= Void + command_options_not_empty: Result implies not command_options.is_empty end |
From: Sven E. <sv...@us...> - 2001-06-26 17:25:56
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant In directory usw-pr-cvs1:/tmp/cvs-serv31038 Modified Files: bootstrap_se.ace geant.xace Log Message: moved from $BONBON to $GOBO Index: bootstrap_se.ace =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/bootstrap_se.ace,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** bootstrap_se.ace 2001/06/26 17:06:50 1.1 --- bootstrap_se.ace 2001/06/26 17:25:53 1.2 *************** *** 11,20 **** assertion (ensure) cluster ! geant: "${BONBON}/tools/geant" default assertion (no) option ; ! geant_command: "${BONBON}/tools/geant/command" default assertion (no) --- 11,20 ---- assertion (ensure) cluster ! geant: "${GOBO}/src/geant" default assertion (no) option ; ! geant_command: "${GOBO}/src/geant/command" default assertion (no) *************** *** 22,26 **** ; ! geant_task: "${BONBON}/tools/geant/task" default assertion (no) --- 22,26 ---- ; ! geant_task: "${GOBO}/src/geant/task" default assertion (no) *************** *** 28,32 **** ; ! geant_parser: "${BONBON}/tools/geant/parser" default assertion (no) --- 28,32 ---- ; ! geant_parser: "${GOBO}/src/geant/parser" default assertion (no) Index: geant.xace =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/src/geant/geant.xace,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** geant.xace 2001/06/26 17:06:50 1.1 --- geant.xace 2001/06/26 17:25:53 1.2 *************** *** 8,12 **** </option> ! <cluster name="geant" location="${BONBON}/tools/geant" > <cluster name="command" /> <cluster name="task" /> --- 8,12 ---- </option> ! <cluster name="geant" location="${GOBO}/src/geant" > <cluster name="command" /> <cluster name="task" /> |
From: Sven E. <sv...@us...> - 2001-06-26 17:06:54
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/parser In directory usw-pr-cvs1:/tmp/cvs-serv27352/geant/parser Added Files: geant_attribute.e geant_attribute_handler.e geant_attribute_list.e geant_composite.e geant_element.e geant_element_names.e geant_project_parser.e Log Message: initial version of geant --- NEW FILE: geant_attribute.e --- indexing description: "represents an XML attribute" library: "geant/xml" author: "Sven Ehrke" copyright: "Copyright (c) 2000, Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_ATTRIBUTE inherit KL_IMPORTED_STRING_ROUTINES end creation make feature make(a_name, a_value : UC_STRING) is do set_name(a_name) set_value(a_value) end set_name(a_name : UC_STRING) is -- assigns 'a_name' to 'name' -- the client is responsible to clone 'a_name' before -- calling this routine if that's what he likes require valid_name : a_name /= void and then a_name.count > 0 do name := a_name end set_value(a_value : UC_STRING) is -- assigns 'a_value' to 'value' -- the client is responsible to clone 'a_value' before -- calling this routine if that's what he likes require valid_value : a_value /= void do value := a_value end to_xml : UC_STRING is do Result := STRING_.make(10) Result.append(name) Result.append("=%"") Result.append(value) Result.append("%"") end name : UC_STRING value : UC_STRING invariant valid_name : name /= void and then not name.is_empty valid_value : value /= void end --- NEW FILE: geant_attribute_handler.e --- indexing description: "manages GEANT_ATTRIBUTEs. This class is used by GEANT_ELEMENT" library: "geant/xml" author: "Sven Ehrke" copyright: "Copyright (c) 2000, Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_ATTRIBUTE_HANDLER feature -- creation make is do !!attributes.make(0) end feature -- attributes set_attribute(a_attribute : GEANT_ATTRIBUTE) is -- appends a_attribute to the internal list if it is not part of the list yet --!!WRONG otherwise a_attribute replaces the old GEANT_ATTRIBUTE assigned to -- a_attribute.name require valid_attribute : a_attribute /= void -- unique_attribute: not attributes.has(a_attribute) do attributes.force_last(a_attribute) end add_attributes(a_attributes : GEANT_ATTRIBUTE_LIST) is -- adds all attributes to the current element local i : INTEGER attr: GEANT_ATTRIBUTE do from i := 1 until i > a_attributes.count loop attr := a_attributes.item(i) set_attribute(attr) i := i + 1 end end get_attributevalue_by_name(a_attribute_name : UC_STRING) : UC_STRING is require valid_attribute_name : a_attribute_name /= void and then a_attribute_name.count > 0 local attr : GEANT_ATTRIBUTE do attr := get_attribute_by_name(a_attribute_name) Result := attr.value ensure valid_result : Result /= void end get_attribute_by_name(a_attribute_name : UC_STRING) : GEANT_ATTRIBUTE is require valid_attribute_name : a_attribute_name /= void and then a_attribute_name.count > 0 do Result := try_to_get_attribute_by_name(a_attribute_name) ensure attribute_found : Result /= void end try_to_get_attribute_by_name(a_attribute_name : UC_STRING) : GEANT_ATTRIBUTE is require valid_attribute_name : a_attribute_name /= void and then a_attribute_name.count > 0 local i : INTEGER attr : GEANT_ATTRIBUTE found : BOOLEAN do -- implementation notes: -- loop over all attributes to find the right one. -- usually a hashtable is used for these kind of things and -- actually the attributes have been in one in the XML_HANDLER -- But: since an element usually just has a few attributes looping -- does not matter here. from i := 1 until found or else i > attributes.count loop attr := attributes.item(i) if attr.name.is_equal(a_attribute_name) then Result := attr found := true end i := i + 1 end -- loop end has_attribute(a_attribute_name : UC_STRING) : BOOLEAN is do Result := try_to_get_attribute_by_name(a_attribute_name) /= void end feature -- ID has_ID : BOOLEAN is do Result := try_to_get_attribute_by_name(C_ID) /= void end get_ID : UC_STRING is require has_ID do Result := get_attributevalue_by_name(C_ID) end feature -- IDREF has_IDREF : BOOLEAN is do Result := try_to_get_attribute_by_name(C_IDREF) /= void end get_IDREF : UC_STRING is require has_IDREF do Result := get_attributevalue_by_name(C_IDREF) end attributes : DS_ARRAYED_LIST [GEANT_ATTRIBUTE] feature -- attributes and setters feature {NONE} -- internal C_ID : UC_STRING is once !!Result.make_from_string("ID") end C_IDREF : UC_STRING is once !!Result.make_from_string("IDREF") end end --- NEW FILE: geant_attribute_list.e --- indexing description: "supports handling of list of attributes" library: "geant/xml" author: "Sven Ehrke" copyright: "Copyright (c) 2000, Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_ATTRIBUTE_LIST inherit DS_ARRAYED_LIST [GEANT_ATTRIBUTE] rename make as ds_arrayed_list_make end creation make_from_hashtable, make_from_ds_bilinear feature -- creation make_from_hashtable(a_attributes : DS_HASH_TABLE[UC_STRING, UC_STRING]) is local cursor : DS_HASH_TABLE_CURSOR[UC_STRING, UC_STRING] attr : GEANT_ATTRIBUTE do ds_arrayed_list_make(10) from cursor := a_attributes.new_cursor cursor.start until cursor.after loop !!attr.make(cursor.key, cursor.item) force_last(attr) cursor.forth end cursor.finish end make_from_ds_bilinear(a_attributes : DS_BILINEAR [DS_PAIR [DS_PAIR [UC_STRING, UC_STRING], UC_STRING]]) is local cs: DS_BILINEAR_CURSOR [DS_PAIR [DS_PAIR [UC_STRING, UC_STRING], UC_STRING]] attr : GEANT_ATTRIBUTE do ds_arrayed_list_make(10) from cs := a_attributes.new_cursor cs.start until cs.off loop !!attr.make(cs.item.first.first, cs.item.second) force_last(attr) cs.forth end end feature -- development show is local attr : GEANT_ATTRIBUTE i : INTEGER do from i := 1 until i > count loop attr := item(i) print(attr.name + "=" + "%"" + attr.value + "%"%N") i := i + 1 end end ucs_empty : UC_STRING is once !!Result.make_from_string("") end end -- class GEANT_ATTRIBUTE_LIST --- NEW FILE: geant_composite.e --- indexing description: "a generic composite class% %taken from the eiffel design patterns book with small modifications" library: "geant/xml" author: "mostly by the authors of the eiffel design patterns book, Sven Ehrke" copyright: "others, Sven Ehrke" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_COMPOSITE [T] creation make feature {ANY} -- Creation --------------------------------------------------------------- make is do !!children.make(10) end feature {ANY} -- Queries --------------------------------------------------------------- parent : GEANT_COMPOSITE [T] is do end -- optional parent, default to Void. If an explicit reference -- to the parent is needed, redefine as an attribute. --------------------------------------------------------------- has (child : T) : BOOLEAN is -- does 'child' belong to the composite? require child_not_void: child /= Void do Result := children.has(child) -- identity comparison, see 'make' end -- has feature {ANY} -- Commands --------------------------------------------------------------- add (new_child : T) is -- add `new_child' to the composite require new_child_not_void: new_child /= Void do children.add(new_child) end --------------------------------------------------------------- remove (child : T) is -- remove T from the composite require child_not_void: child /= Void local i, cnt : INTEGER found : BOOLEAN do children.remove(child) end -- remove children : DS_ARRAYED_LIST [T] feature {NONE} -- Private --------------------------------------------------------------- invariant children_not_void : children /= Void end --- NEW FILE: geant_element.e --- indexing description: "represents a XML element" library: "geant/xml" author: "Sven Ehrke" copyright: "Copyright (c) 2000, Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_ELEMENT inherit GEANT_COMPOSITE [GEANT_ELEMENT] rename make as geant_composite_make end KL_IMPORTED_STRING_ROUTINES end GEANT_ATTRIBUTE_HANDLER rename make as am_make end creation make feature -- creation make(a_name : UC_STRING) is require valid_name : a_name /= void and then a_name.count > 0 do geant_composite_make set_name(a_name) am_make set_content(ucs_empty) end feature -- DOM manipulation add_child(a_child : like Current) is require valid_child : a_child /= void do children.force_last(a_child) end feature -- queries get_child(a_name : UC_STRING) : GEANT_ELEMENT is -- returns the first child element within this element with the given local name -- and belonging to no namespace. require valid_name : a_name /= void and then not a_name.is_empty -- existing_child : -- has_child(a_name) local i : INTEGER el : GEANT_ELEMENT found : BOOLEAN do from i := 1 until i > children.count or found loop el := children.item(i) if el.name.is_equal(a_name) then found := true end i := i + 1 end if found then Result := el end end get_children_by_name(a_name : UC_STRING) : DS_ARRAYED_LIST [GEANT_ELEMENT] is -- return all direct child nodes which have the name 'a_name' require valid_name : a_name /= void and then a_name.count > 0 local i : INTEGER c : INTEGER el : GEANT_ELEMENT do !!Result.make(children.count) c := 1 from i := 1 until i > children.count loop el := children.item(i) if el.name.is_equal(a_name) then Result.put(el, c) c := c + 1 end i := i + 1 end end feature -- attributes and setters name : UC_STRING set_name(a_name : UC_STRING) is -- assigns 'a_name' to 'name' -- the client is responsible to clone 'a_name' before -- calling this routine if that's what he likes require valid_name : a_name /= void and then a_name.count > 0 do name := a_name end content : UC_STRING set_content(a_content : UC_STRING) is -- assigns 'a_content' to 'content' -- the client is responsible to clone 'a_content' before -- calling this routine if that's what he likes require valid_content : a_content /= void do content := a_content end show is do print("======================================================%N") print(as_text) print("======================================================%N") end as_text : UC_STRING is do Result := get_writer.as_text(Current) end feature {NONE} feature {NONE} -- internal ucs_empty : UC_STRING is once !!Result.make_from_string("") end end --- NEW FILE: geant_element_names.e --- indexing description: "element name constants for GEANT" author: "Sven Ehrke (sve...@sv...)" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_ELEMENT_NAMES feature ucs_target : UC_STRING is once !!Result.make_from_string("target") end ucs_default_build_filename : UC_STRING is once !!Result.make_from_string("build.eant") end feature -- target attribute names and values ucs_project : UC_STRING is once !!Result.make_from_string("project") end ucs_default : UC_STRING is once !!Result.make_from_string("default") end ucs_name : UC_STRING is once !!Result.make_from_string("name") end ucs_true : UC_STRING is once !!Result.make_from_string("true") end ucs_false : UC_STRING is once !!Result.make_from_string("false") end ucs_empty : UC_STRING is once !!Result.make_from_string("") end feature -- task names ucs_compile_se : UC_STRING is once !!Result.make_from_string("compile_se") end ucs_exec : UC_STRING is once !!Result.make_from_string("exec") end ucs_xace : UC_STRING is once !!Result.make_from_string("xace") end ucs_gelex : UC_STRING is once !!Result.make_from_string("gelex") end ucs_geyacc : UC_STRING is once !!Result.make_from_string("geyacc") end ucs_lcc : UC_STRING is once !!Result.make_from_string("lcc") end ucs_var : UC_STRING is once !!Result.make_from_string("var") end end --- NEW FILE: geant_project_parser.e --- indexing description: "responsible for creating the tree structure from the XML document" library: "geant/xml" author: "Sven Ehrke" copyright: "Copyright (c) 2000, Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_PROJECT_PARSER inherit XM_EVENT_PARSER redefine on_start_tag, on_end_tag, on_content end creation make_from_imp feature on_start_tag (a_name, ns_prefix: UC_STRING; attributes: DS_BILINEAR [DS_PAIR [DS_PAIR [UC_STRING, UC_STRING], UC_STRING]]) is local el : GEANT_ELEMENT cur_el : GEANT_ELEMENT attr_list : GEANT_ATTRIBUTE_LIST do debug("trace_xml") print (a_name.out + "%N") end !!el.make(a_name) !!attr_list.make_from_ds_bilinear(attributes) el.add_attributes(attr_list) if root_element = void then -- create the root element root_element := el end if not stack.is_empty then -- add the new element as a child to the current element and make it the current element cur_el := stack.item cur_el.add_child(el) end -- and make the new element the current element stack.put(el) end on_end_tag (name, ns_prefix: UC_STRING) is do debug("trace_xml") print ("/" + name.out + "%N") end stack.remove end on_content (chr_data: UC_STRING) is local el : GEANT_ELEMENT do el := stack.item el.set_content(clone(chr_data)) end feature -- Class root_element : GEANT_ELEMENT stack : DS_ARRAYED_STACK[GEANT_ELEMENT] is once !!Result.make(10) end end |
From: Sven E. <sv...@us...> - 2001-06-26 17:06:54
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/task In directory usw-pr-cvs1:/tmp/cvs-serv27352/geant/task Added Files: geant_compile_se_task.e geant_exec_task.e geant_gelex_task.e geant_geyacc_task.e geant_lcc_task.e geant_task.e geant_var_task.e geant_xace_task.e Log Message: initial version of geant --- NEW FILE: geant_compile_se_task.e --- indexing description: "compilation task for SmallEiffel" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_compile_se_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_COMPILE_SE_TASK inherit GEANT_COMPILE_SE_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is local s : STRING do -- ace_file (optional) if has_attribute(a_el, attr_ace_file) then s := get_attribute_value_with_default(a_el, attr_ace_file, "") set_ace_file(s) else -- root_class s := get_attribute_value(a_el, attr_root_class) set_root_class(s) -- creation_procedure s := get_attribute_value(a_el, attr_creation_procedure) set_creation_procedure(s) -- executable s := get_attribute_value(a_el, attr_executable) set_executable(s) -- case_insensitive if has_attribute(a_el, attr_case_insensitive) then set_case_insensitive(get_boolean_value(a_el, attr_case_insensitive)) end -- no_style_warning if has_attribute(a_el, attr_no_style_warning) then set_no_style_warning(get_boolean_value(a_el, attr_no_style_warning)) end end end attr_ace_file : STRING is "ace_file" attr_root_class : STRING is "root_class" attr_creation_procedure : STRING is "creation_procedure" attr_executable : STRING is "executable" attr_case_insensitive : STRING is "case_insensitive" attr_no_style_warning : STRING is "no_style_warning" end --- NEW FILE: geant_exec_task.e --- indexing description: "exec task" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_exec_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_EXEC_TASK inherit GEANT_EXEC_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is local s : UC_STRING do s := a_el.get_attributevalue_by_name(ucs_attr_executable) set_cmd(s.out) end ucs_attr_executable : UC_STRING is once !!Result.make_from_string("executable") end end --- NEW FILE: geant_gelex_task.e --- indexing description: "gelex task" library: "gobo/geant" author: "Sven Ehrke" id: "$Id: geant_gelex_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_GELEX_TASK inherit GEANT_GELEX_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is do -- size if has_attribute(a_el, attr_size) then set_size(get_attribute_value(a_el, attr_size)) end -- backup if has_attribute(a_el, attr_backup) then set_backup(get_boolean_value(a_el, attr_backup)) end -- ecs if has_attribute(a_el, attr_ecs) then set_ecs(get_boolean_value(a_el, attr_ecs)) end -- full if has_attribute(a_el, attr_full) then set_full(get_boolean_value(a_el, attr_full)) end -- case_insensitive if has_attribute(a_el, attr_case_insensitive) then set_case_insensitive(get_boolean_value(a_el, attr_case_insensitive)) end -- case_meta_ecs if has_attribute(a_el, attr_meta_ecs) then set_meta_ecs(get_boolean_value(a_el, attr_meta_ecs)) end -- no_default if has_attribute(a_el, attr_no_default) then set_no_default(get_boolean_value(a_el, attr_no_default)) end -- no_warn if has_attribute(a_el, attr_no_warn) then set_no_warn(get_boolean_value(a_el, attr_no_warn)) end -- separate_actions if has_attribute(a_el, attr_separate_actions) then set_separate_actions(get_boolean_value(a_el, attr_separate_actions)) end -- outfile if has_attribute(a_el, attr_outfile) then set_outfile(get_attribute_value(a_el, attr_outfile)) end -- input_filename set_gelex_input_filename(get_attribute_value(a_el, attr_input_filename)) end attr_size : STRING is "size" attr_backup : STRING is "backup" attr_ecs : STRING is "ecs" attr_full : STRING is "full" attr_case_insensitive : STRING is "case_insensitive" attr_meta_ecs : STRING is "meta_ecs" attr_no_default : STRING is "no_default" attr_no_warn : STRING is "no_warn" attr_separate_actions : STRING is "separate_actions" attr_outfile : STRING is "outfile" attr_input_filename : STRING is "input_filename" end --- NEW FILE: geant_geyacc_task.e --- indexing description: "geyacc task" library: "gobo/geant" author: "Sven Ehrke" id: "$Id: geant_geyacc_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_GEYACC_TASK inherit GEANT_GEYACC_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is do -- separate_actions if has_attribute(a_el, attr_separate_actions) then set_separate_actions(get_boolean_value(a_el, attr_separate_actions)) end -- verbose_filename if has_attribute(a_el, attr_verbose_filename) then set_verbose_filename(get_attribute_value(a_el, attr_verbose_filename)) end -- eiffel_tokens_classname if has_attribute(a_el, attr_eiffel_tokens_classname) then set_eiffel_tokens_classname(get_attribute_value(a_el, attr_eiffel_tokens_classname)) end -- eiffel_parser_filename if has_attribute(a_el, attr_eiffel_parser_filename) then set_eiffel_parser_filename(get_attribute_value(a_el, attr_eiffel_parser_filename)) end -- grammar_filename set_grammar_filename(get_attribute_value(a_el, attr_grammar_filename)) end attr_separate_actions : STRING is "separate_actions" attr_verbose_filename : STRING is "verbose_filename" attr_eiffel_tokens_classname : STRING is "eiffel_tokens_classname" attr_eiffel_parser_filename : STRING is "eiffel_parser_filename" attr_grammar_filename : STRING is "grammar_filename" end --- NEW FILE: geant_lcc_task.e --- indexing description: "lcc C-Compiler task" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_lcc_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_LCC_TASK inherit GEANT_LCC_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is do -- -Fo set_executable(get_attribute_value(a_el, attr_executable)) -- -sourcefilename set_sourcefilename(get_attribute_value(a_el, attr_sourcefilename)) end attr_executable : STRING is "executable" attr_sourcefilename : STRING is "sourcefilename" end --- NEW FILE: geant_task.e --- indexing description: "deferred task which supports creation of the object using a XML definition" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" deferred class GEANT_TASK inherit GEANT_COMMAND GEANT_ELEMENT_NAMES feature load_from_element(a_el : GEANT_ELEMENT) is deferred end feature -- auxiliar -------------- get_attribute_value_with_default(a_el : GEANT_ELEMENT; a_attr_name, a_default_attr_value : STRING) : STRING is local uc_name : UC_STRING uc_value : UC_STRING do !!uc_name.make_from_string(a_attr_name) !!uc_value.make_from_string(a_default_attr_value) if a_el.has_attribute(uc_name) then uc_value := a_el.get_attributevalue_by_name(uc_name) end Result := get_attribute_value_with_default_uc(a_el, uc_name, uc_value).out end get_attribute_value(a_el : GEANT_ELEMENT; a_attr_name : STRING) : STRING is local ucs : UC_STRING do !!ucs.make_from_string(a_attr_name) Result := a_el.get_attributevalue_by_name(ucs).out end get_boolean_value_with_default(a_el : GEANT_ELEMENT; a_attr_name : STRING; a_default_value : BOOLEAN) : BOOLEAN is local ucs_attr_name : UC_STRING do !!ucs_attr_name.make_from_string(a_attr_name) Result := get_boolean_value_with_default_uc(a_el, ucs_attr_name, a_default_value) end get_boolean_value(a_el : GEANT_ELEMENT; a_attr_name : STRING) : BOOLEAN is local ucs_attr_name : UC_STRING do !!ucs_attr_name.make_from_string(a_attr_name) Result := get_boolean_value_uc(a_el, ucs_attr_name) end has_attribute(a_el : GEANT_ELEMENT; a_attr_name : STRING) : BOOLEAN is local ucs : UC_STRING do !!ucs.make_from_string(a_attr_name) Result := has_attribute(a_el, a_attr_name) end feature -- unicode versions get_attribute_value_with_default_uc(a_el : GEANT_ELEMENT; a_attr_name, a_default_attr_value : UC_STRING) : UC_STRING is do Result := a_default_attr_value if a_el.has_attribute(a_attr_name) then Result := a_el.get_attributevalue_by_name(a_attr_name) end end get_attribute_value_uc(a_el : GEANT_ELEMENT; a_attr_name : UC_STRING) : UC_STRING is require attribute_exists : a_el.has_attribute(a_attr_name) do Result := a_el.get_attributevalue_by_name(a_attr_name) end get_boolean_value_with_default_uc(a_el : GEANT_ELEMENT; a_attr_name : UC_STRING; a_default_value : BOOLEAN) : BOOLEAN is do if not a_el.has_attribute(a_attr_name) then Result := a_default_value else Result := get_boolean_value_uc(a_el, a_attr_name) end end get_boolean_value_uc(a_el : GEANT_ELEMENT; a_attr_name : UC_STRING) : BOOLEAN is require attribute_exists : a_el.has_attribute(a_attr_name) local ucs : UC_STRING do ucs := get_attribute_value_uc(a_el, a_attr_name) check ucs /= void and then ucs.count /= 0 end if ucs_true.is_equal(ucs) then Result := true elseif ucs_false.is_equal(ucs) then Result := false else print("WARNING: wrong value (" + ucs.out + ") for attribute " + a_attr_name.out + " Valid values are `true' and `false'. Using to `false' now.") Result := false end end has_attribute_uc(a_el : GEANT_ELEMENT; a_attr_name : UC_STRING) : BOOLEAN is do !!ucs.make_from_string(a_attr_name) Result := a_el.has_attribute(a_attr_name) end end --- NEW FILE: geant_var_task.e --- indexing description: "var task" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_var_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_VAR_TASK inherit GEANT_VAR_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is local s : STRING do -- name set_name(get_attribute_value(a_el, attr_name)) -- value s := get_attribute_value(a_el, attr_value) -- support for environment variables if s.item(1) = '$' then s := s.substring(2, s.count) s := get_environment_variable(s) end set_value(s) end attr_name : STRING is "name" attr_value : STRING is "value" end --- NEW FILE: geant_xace_task.e --- indexing description: "xace task" library: "gobo/geant" author: "Sven Ehrke" id: "$Id: geant_xace_task.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_XACE_TASK inherit GEANT_XACE_COMMAND GEANT_TASK end creation make, load_from_element feature load_from_element(a_el : GEANT_ELEMENT) is local s : STRING b : BOOLEAN do --!!1 if we do not call make here `compile' if true -- where is the bug ?? make -- options (optional) s := get_attribute_value_with_default(a_el, attr_options, "") set_options(s) -- command s := get_attribute_value(a_el, attr_command) set_command(s) -- command_options (optional) s := get_attribute_value_with_default(a_el, attr_command_options, "") set_command_options(s) -- xace_filename s := get_attribute_value(a_el, attr_xace_filename) set_xace_filename(s) -- compile b := get_boolean_value_with_default(a_el, attr_compile, false) set_compile(b) end attr_options : STRING is "options" attr_command : STRING is "command" attr_command_options : STRING is "command_options" attr_xace_filename : STRING is "xace_filename" attr_compile : STRING is "compile" end |
Update of /cvsroot/gobo-eiffel/gobo/src/geant In directory usw-pr-cvs1:/tmp/cvs-serv27352/geant Added Files: Readme.txt bootstrap_se.ace build.eant geant.e geant.xace geant_project.e geant_shared_properties.e Log Message: initial version of geant --- NEW FILE: Readme.txt --- geant (Ant for Eiffel) ====================== short description: ================== build tool for Eiffel, modeled after the Jakarta Ant build tool for Java. external dependencies: ====================== geant is dependant on - cvs version of eXML (see http://exml.sourceforge.net) - cvs version of GOBO (see http://gobo-eiffel.sourceforge.net) compilation: ============= open a terminal in the 'build' subdirectory 1.) first time 1.a) without xace: ------------- invoke 'compile bootstrap_se.ace' (uses SmallEiffel for compilation) 1.b) with xace: ------------- invoke 'xace --build --se xace.xml' invoke 'compile se.xace' 2.) After the first time you can compile geant with geant itself: invoke 'geant' which uses the file 'ebuild.xml' for the build process copy the geant executable to a directory your path points to. run: ============= cd to the directory 'build' invoke 'geant' which compiles geant again into the executable geant.exe and renames it to g.exe. invoke 'geant clean' to clean up the directory invoke 'geant test' which runs some test (just for demo). Check out the file 'ebuild.xml' for the details. It seems a little weird to compile geant with geant but simply try to compile your own application with it by copying the ebuild.xml file into your project directory, modify it according to your needsand use it. status/plans: ============= - more specific tasks (use the exec task for now) - support for other Eiffel Vendors - support for os/platform independency open issues: ============ - how do we get the return code from a system command - Sven Ehrke, 10th June 2001, last updat: 23.6.2001 --- NEW FILE: bootstrap_se.ace --- system geant root GEANT: make default no_style_warning (yes) assertion (ensure) cluster geant: "${BONBON}/tools/geant" default assertion (no) option ; geant_command: "${BONBON}/tools/geant/command" default assertion (no) option ; geant_task: "${BONBON}/tools/geant/task" default assertion (no) option ; geant_parser: "${BONBON}/tools/geant/parser" default assertion (no) option ; exml: "${EXML}/library" default assertion (no) option ; exml_factory: "${EXML}/library/factory" default assertion (no) option ; exml_position: "${EXML}/library/position" default assertion (no) option ; exml_source: "${EXML}/library/source" default assertion (no) option ; exml_general: "${EXML}/library/general" default assertion (no) option ; exml_event: "${EXML}/library/event" default assertion (no) option ; exml_tree: "${EXML}/library/tree" default assertion (no) option ; exml_formater: "${EXML}/library/formater" default assertion (no) option ; exml_xace: "${EXML}/library/xace" default assertion (no) option ; exml_xace_support: "${EXML}/library/xace/support" default assertion (no) option ; exml_xace_ast: "${EXML}/library/xace/ast" default assertion (no) option ; exml_xace_generator: "${EXML}/library/xace/generator" default assertion (no) option ; exml_xace_parse: "${EXML}/library/xace/parse" default assertion (no) option ; exml_xace_error: "${EXML}/library/xace/error" default assertion (no) option ; exml_impl: "${EXML}/library/impl" default assertion (no) option ; exml_impl_interface: "${EXML}/library/impl/interface" default assertion (no) option ; exml_impl_interface_general: "${EXML}/library/impl/interface/general" default assertion (no) option ; exml_impl_interface_event: "${EXML}/library/impl/interface/event" default assertion (no) option ; exml_impl_interface_tree: "${EXML}/library/impl/interface/tree" default assertion (no) option ; exml_impl_eiffel: "${EXML}/library/impl/eiffel" default assertion (no) option ; exml_impl_eiffel_event: "${EXML}/library/impl/eiffel/event" default assertion (no) option ; exml_impl_tree_on_event: "${EXML}/library/impl/tree_on_event" default assertion (no) option ; exml_impl_tree_on_event_tree: "${EXML}/library/impl/tree_on_event/tree" default assertion (no) option ; exml_impl_no_expat: "${EXML}/library/impl/no_expat" default assertion (no) option ; exml_impl_no_expat_event: "${EXML}/library/impl/no_expat/event" default assertion (no) option ; gobo: "${GOBO}/library" default assertion (no) option ; gobo_kernel: "${GOBO}/library/kernel" default assertion (no) option ; gobo_kernel_spec: "${GOBO}/library/kernel/spec" default assertion (no) option ; gobo_kernel_spec_se: "${GOBO}/library/kernel/spec/se" default assertion (no) option ; gobo_kernel_unicode: "${GOBO}/library/kernel/unicode" default assertion (no) option ; gobo_structure: "${GOBO}/library/structure" default assertion (no) option ; gobo_structure_container: "${GOBO}/library/structure/container" default assertion (no) option ; gobo_structure_dispenser: "${GOBO}/library/structure/dispenser" default assertion (no) option ; gobo_structure_list: "${GOBO}/library/structure/list" default assertion (no) option ; gobo_structure_set: "${GOBO}/library/structure/set" default assertion (no) option ; gobo_structure_sort: "${GOBO}/library/structure/sort" default assertion (no) option ; gobo_structure_support: "${GOBO}/library/structure/support" default assertion (no) option ; gobo_structure_table: "${GOBO}/library/structure/table" default assertion (no) option ; gobo_lexical: "${GOBO}/library/lexical" default assertion (no) option ; gobo_lexical_automaton: "${GOBO}/library/lexical/automaton" default assertion (no) option ; gobo_lexical_error: "${GOBO}/library/lexical/error" default assertion (no) option ; gobo_lexical_lex: "${GOBO}/library/lexical/lex" default assertion (no) option ; gobo_lexical_generation: "${GOBO}/library/lexical/generation" default assertion (no) option ; gobo_lexical_regexp: "${GOBO}/library/lexical/regexp" default assertion (no) option ; gobo_lexical_scanner: "${GOBO}/library/lexical/scanner" default assertion (no) option ; gobo_lexical_skeleton: "${GOBO}/library/lexical/skeleton" default assertion (no) option ; gobo_lexical_support: "${GOBO}/library/lexical/support" default assertion (no) option ; gobo_parse: "${GOBO}/library/parse" default assertion (no) option ; gobo_parse_error: "${GOBO}/library/parse/error" default assertion (no) option ; gobo_parse_fsm: "${GOBO}/library/parse/fsm" default assertion (no) option ; gobo_parse_generation: "${GOBO}/library/parse/generation" default assertion (no) option ; gobo_parse_grammar: "${GOBO}/library/parse/grammar" default assertion (no) option ; gobo_parse_parser: "${GOBO}/library/parse/parser" default assertion (no) option ; gobo_parse_skeleton: "${GOBO}/library/parse/skeleton" default assertion (no) option ; gobo_parse_support: "${GOBO}/library/parse/support" default assertion (no) option ; gobo_parse_yacc: "${GOBO}/library/parse/yacc" default assertion (no) option ; gobo_utility: "${GOBO}/library/utility" default assertion (no) option ; gobo_utility_error: "${GOBO}/library/utility/error" default assertion (no) option ; gobo_utility_formatter: "${GOBO}/library/utility/formatter" default assertion (no) option ; gobo_utility_command: "${GOBO}/library/utility/command" default assertion (no) option ; gobo_utility_spec: "${GOBO}/library/utility/spec" default assertion (no) option ; gobo_utility_spec_se: "${GOBO}/library/utility/spec/se" default assertion (no) option ; gobo_utility_support: "${GOBO}/library/utility/support" default assertion (no) option ; ucstring: "${UCSTRING}/lib" default assertion (no) option ; ucstring_spec: "${UCSTRING}/lib/spec" default assertion (no) option ; ucstring_spec_se: "${UCSTRING}/lib/spec/se" default assertion (no) option ; se_kernel_se: "${SmallEiffelDirectory}/lib_std" default assertion (no) option ; external generate c_compiler_options: "-I${GOBO}/library/kernel/include " end --- NEW FILE: build.eant --- <project name="geant" default="compile"> <target name="compile" description="compiles GEANT"> <xace command="build" command_options="se" xace_filename="geant.xace" compile="true" /> <exec executable="mv geant.exe g.exe" /> </target> <target name="clean" description="deletes generated files which can be rebuild using the compile target"> <exec executable="clean geant" /> </target> <target name="test" description="tests the tasks"> <exec executable="dir" /> </target> </project> --- NEW FILE: geant.e --- indexing description: "GEANT is a build tool for Eiffel% %main features:% %- platform independend% %- vendor independant% %- configuration in XML% %based on the concepts of Jakarta Ant (the build tool for Java)" author: "Sven Ehrke (sve...@sv...)" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:50 $" revision: "$Revision: 1.1 $" class GEANT inherit GEANT_SHARED_PROPERTIES GEANT_ELEMENT_NAMES creation make feature make is do !!project.make project.load launch_build end launch_build is local i : INTEGER ii : INTEGER target : GEANT_ELEMENT task_el : GEANT_ELEMENT task : GEANT_TASK do from i := 1 until i > project.targets.count loop target := project.targets.item(i) if target.get_attributevalue_by_name(ucs_name).is_equal(project.current_target_name) then print(project.current_target_name.out + ":%N") from ii := 1 until ii > target.children.count loop task_el := target.children.item(ii) ------- task dispatching ------ -- compile_se -- if task_el.name.is_equal(ucs_compile_se) then -- SmallEiffel compilation !GEANT_COMPILE_SE_TASK!task.load_from_element(task_el) -- exec -- elseif task_el.name.is_equal(ucs_exec) then !GEANT_EXEC_TASK!task.load_from_element(task_el) -- var -- elseif task_el.name.is_equal(ucs_var) then !GEANT_VAR_TASK!task.load_from_element(task_el) -- lcc -- elseif task_el.name.is_equal(ucs_lcc) then !GEANT_LCC_TASK!task.load_from_element(task_el) -- xace -- elseif task_el.name.is_equal(ucs_xace) then !GEANT_XACE_TASK!task.load_from_element(task_el) -- gelex -- elseif task_el.name.is_equal(ucs_gelex) then !GEANT_GELEX_TASK!task.load_from_element(task_el) -- geyacc -- elseif task_el.name.is_equal(ucs_geyacc) then !GEANT_GEYACC_TASK!task.load_from_element(task_el) -- DEFAULT -- else task := void end ------- task execution ------ if task /= void then task.execute else print("WARNING: unknown task : " + task_el.name.out + "%N") end ii := ii + 1 end end i := i + 1 end -- print("BUILD SUCCESSFUL") --!! handle not successful cases end current_target_name : UC_STRING project : GEANT_PROJECT end --- NEW FILE: geant.xace --- <?xml version="1.0"?> <system name="geant"> <root class="GEANT" creation="make"/> <cluster> <option> <require enable="True"/> <ensure enable="True"/> </option> <cluster name="geant" location="${BONBON}/tools/geant" > <cluster name="command" /> <cluster name="task" /> <cluster name="parser" /> </cluster> <mount location="${EXML}/library/gobo.xace" /> <mount location="${EXML}/library/kernel.xace" /> <mount location="${EXML}/library/exml.xace" > <exclude cluster="exml.impl.expat"/> <exclude cluster="exml.impl.no_eiffel"/> <exclude cluster="exml.impl.no_tree_on_event"/> </mount> </cluster> </system> --- NEW FILE: geant_project.e --- indexing description: "Represents a geant project file% %main features:% %- platform independend% %- vendor independant% %- configuration in XML% %based on the concepts of Jakarta Ant (the build tool for Java)" author: "Sven Ehrke (sve...@sv...)" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:50 $" revision: "$Revision: 1.1 $" class GEANT_PROJECT inherit GEANT_ELEMENT_NAMES creation make, make_with_filename feature make_with_filename(a_filename : UC_STRING) is do build_filename := a_filename end make is -- create the project with the default filename `build.eant' do make_with_filename(ucs_default_build_filename) end load is -- read the project configuration from `build_filename' and convert it into a 'GEANT_DOM' require build_filename_not_void : build_filename /= Void build_filename_not_empty: not build_filename.is_empty local xml_parser : GEANT_PROJECT_PARSER do -- reset current state and create a parser reset !! xml_parser.make_from_imp (factory.new_eiffel_event_parser_imp) xml_parser.parse_from_file_name (build_filename) -- setup the prject element project_element := xml_parser.root_element -- determine all the targets of the project targets := project_element.get_children_by_name(ucs_target) -- determine start target if argument_count /= 0 then !!start_target_name.make_from_string(argument(1)) else start_target_name := project_element.get_attributevalue_by_name(ucs_default) end current_target_name := start_target_name ensure valid_project_element : project_element /= void valid_start_target : start_target_name /= void and then start_target_name.count > 0 end reset is -- resets the current state of the project do project_element := void targets := void end project_element : GEANT_ELEMENT -- the project element read targets : DS_ARRAYED_LIST [GEANT_ELEMENT] -- contains all the target elements of a project file start_target_name : UC_STRING -- the name of the target the build process starts with current_target_name : UC_STRING -- while processing the targets this changes build_filename : UC_STRING -- the name of the file containing the configuration information to build a eiffel project factory: expanded XM_PARSER_FACTORY -- the factory to create the parser end --- NEW FILE: geant_shared_properties.e --- indexing description: "common properties for GEANT" author: "Sven Ehrke (sve...@sv...)" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:50 $" revision: "$Revision: 1.1 $" class GEANT_SHARED_PROPERTIES feature vars : DS_HASH_TABLE [STRING, STRING] is -- global variables (called 'properties' in ant) once !!Result.make(1) end end |
From: Sven E. <sv...@us...> - 2001-06-26 17:06:54
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/command In directory usw-pr-cvs1:/tmp/cvs-serv27352/geant/command Added Files: geant_command.e geant_compile_se_command.e geant_exec_command.e geant_gelex_command.e geant_geyacc_command.e geant_lcc_command.e geant_var_command.e geant_xace_command.e Log Message: initial version of geant --- NEW FILE: geant_command.e --- indexing description: "the general command class from which all other commands inherit from" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" deferred class GEANT_COMMAND inherit GEANT_SHARED_PROPERTIES feature execute is deferred end log(a_msg : STRING) is do print(a_msg) end end --- NEW FILE: geant_compile_se_command.e --- indexing description: "compilation command for SmallEiffel" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_compile_se_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_COMPILE_SE_COMMAND inherit GEANT_COMMAND end creation make feature make is do end execute is require valid_configuration : valid_configuration local cmd : STRING do if valid_ace_configuration then cmd := create_ace_cmdline else cmd := create_traditional_cmdline end log(" [compile_se] " + cmd + "%N") system(cmd) end valid_configuration : BOOLEAN is do Result := valid_ace_configuration or else valid_traditional_configuration end valid_ace_configuration : BOOLEAN is do Result := (ace_file /= void and then ace_file.count > 0) and not valid_traditional_configuration end valid_traditional_configuration : BOOLEAN is do Result := (root_class /= void and then root_class.count > 0) and (executable /= void and then executable.count > 0) and not valid_ace_configuration end create_ace_cmdline : STRING is require valid_ace_configuration : valid_ace_configuration do !!Result.make_from_string("compile ") Result.append(ace_file) end create_traditional_cmdline : STRING is require valid_traditional_configuration : valid_traditional_configuration do !!Result.make_from_string("compile") Result.append(" -o "); Result.append(executable) if case_insensitive then Result.append(" -case_insensitive") end if no_style_warning then Result.append(" -no_style_warning") end Result.append(" "); Result.append(root_class) Result.append(" ") if creation_procedure /= void and then not creation_procedure.is_empty then Result.append(creation_procedure) else Result.append("make") end end set_case_insensitive(a_case_insensitive : BOOLEAN) is do case_insensitive := a_case_insensitive end set_no_style_warning(a_no_style_warning : BOOLEAN) is do no_style_warning := a_no_style_warning end set_executable(a_executable : STRING) is require executable_not_void : a_executable /= Void executable_not_empty : not a_executable.is_empty -- if platform = windows ends with ".exe" do executable := a_executable end set_root_class(a_root_class : STRING) is require root_class_not_void : a_root_class /= Void root_class_not_empty : not a_root_class.is_empty do root_class := a_root_class end set_creation_procedure(a_creation_procedure : STRING) is require creation_procedure_not_void : a_creation_procedure /= Void creation_procedure_not_empty : not a_creation_procedure.is_empty do creation_procedure := a_creation_procedure end set_ace_file(a_ace_file : STRING) is require ace_file_not_void : a_ace_file /= Void ace_file_not_empty : not a_ace_file.is_empty do ace_file := a_ace_file end --feature {NONE} case_insensitive : BOOLEAN no_style_warning : BOOLEAN executable : STRING root_class : STRING creation_procedure : STRING ace_file : STRING end --- NEW FILE: geant_exec_command.e --- indexing description: "exec command" library: "gobo/geant" author: "Sven Ehrke" id: "$Id: geant_exec_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_EXEC_COMMAND inherit GEANT_COMMAND creation make feature make is do end execute is require cmd_not_void : cmd /= Void cmd_not_empty : not cmd.is_empty local sc : UT_SHELL_COMMAND do log(" [exec] " + cmd + "%N") !!sc.make(cmd) sc.execute end set_cmd(a_cmd : STRING) is require cmd_not_void : a_cmd /= Void cmd_not_empty : not a_cmd.is_empty do cmd := a_cmd end --feature {NONE} cmd : STRING end --- NEW FILE: geant_gelex_command.e --- indexing description: "gelex command" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_gelex_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_GELEX_COMMAND inherit GEANT_COMMAND end KL_IMPORTED_STRING_ROUTINES end creation make -- ?? how do I set options which are true by default to false ? feature make is do a_size := "" outfile := "" gelex_input_filename := "" end execute is require gelex_input_filename_not_void : gelex_input_filename /= Void gelex_input_filename_not_empty : not gelex_input_filename.is_empty meta_ecs implies not full full implies not meta_ecs local cmd : STRING do cmd := "gelex " -- -a if size /= void and then not size.is_empty then cmd.append("-a ") cmd.append(size.out) end -- -b if backup then cmd.append("-b ") end -- -e --!! ecs is the default. there seems no way to set it to false if ecs then cmd.append("-e ") end -- -f if full then cmd.append("-f ") end -- -i if case_insensitive then cmd.append("-i ") --?? how do I set it to false ? end -- -m if meta_ecs then cmd.append("-m ") --?? how do I set it to false ? end -- -s if no_default then cmd.append("-s ") end -- -w if no_warn then cmd.append("-w ") end -- -x if separate_actions then cmd.append("-x ") end -- -o if outfile /= void and then not outfile.is_empty then cmd.append("-o ") cmd.append(outfile) cmd.append(" ") end cmd.append(gelex_input_filename) log(" [gelex] " + cmd + "%N") system(cmd) end feature -- gelex commandline options setters set_size(a_size : STRING) is -- -a option, default: 3000 require STRING_.is_integer(a_size) do size := a_size end set_backup(a_backup : BOOLEAN) is -- -b option, default: false do backup := a_backup end set_ecs(a_ecs : BOOLEAN) is -- -e option, default: true --?? how can one set it to false ? do ecs := a_ecs end set_full(a_full : BOOLEAN) is -- -f option, default: false do full := a_full end set_case_insensitive(a_case_insensitive : BOOLEAN) is -- -i option, default: true do case_insensitive := a_case_insensitive end set_meta_ecs(a_meta_ecs : BOOLEAN) is -- -m option, default: true --!! check that full is false, since this option does not make sense together with full do meta_ecs := a_meta_ecs end set_no_default(a_no_default : BOOLEAN) is -- -s option, default: false do no_default := a_no_default end set_no_warn(a_no_warn : BOOLEAN) is -- -w option, default: false do no_warn := a_no_warn end set_separate_actions(a_separate_actions : BOOLEAN) is -- -x option, default: false do separate_actions := a_separate_actions end set_outfile(a_outfile : STRING) is -- -o option -- if omitted output goes to stdout require outfile_not_void : a_outfile /= Void outfile_not_empty : not a_outfile.is_empty do outfile := a_outfile end set_gelex_input_filename(a_gelex_input_filename : STRING) is -- required require gelex_input_filename_not_void : a_gelex_input_filename /= Void gelex_input_filename_not_empty : not a_gelex_input_filename.is_empty do gelex_input_filename := a_gelex_input_filename end feature -- gelex commandline options size : STRING -- -a option, default: 3000 backup : BOOLEAN -- -b option, default: false ecs : BOOLEAN -- -e option, default: true --?? how can one set it to false ? full : BOOLEAN -- -f option, default: false case_insensitive : BOOLEAN -- -i option, default: true meta_ecs : BOOLEAN -- -m option, default: true --!! check that full is false, since this option does not make sense together with full no_default : BOOLEAN -- -s option, default: false no_warn : BOOLEAN -- -w option, default: false separate_actions : BOOLEAN -- -x option, default: false outfile : STRING -- -o option -- if omitted output goes to stdout gelex_input_filename : STRING -- required end --- NEW FILE: geant_geyacc_command.e --- indexing description: "geyacc command" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_geyacc_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "Sven Ehrke and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_GEYACC_COMMAND inherit GEANT_COMMAND end KL_IMPORTED_STRING_ROUTINES end creation make -- ?? how do I turn options which are on by default off ? feature make is do a_size := "" eiffel_parser_classname := "" grammar_filename := "" end execute is require grammar_filename_not_void : grammar_filename /= Void grammar_filename_not_empty: not grammar_filename.is_empty local cmd : STRING do cmd := "geyacc " -- -v if verbose_filename /= void and then verbose_filename.count > 0 then cmd.append("-v ") cmd.append(verbose_filename) cmd.append(" ") end -- -x if separate_actions then cmd.append("-x ") end -- -t if eiffel_tokens_classname /= void and then eiffel_tokens_classname.count > 0 then cmd.append("-t ") cmd.append(eiffel_tokens_classname) cmd.append(" ") end -- -o if eiffel_parser_filename /= void and then eiffel_parser_filename.count > 0 then cmd.append("-o ") cmd.append(eiffel_parser_filename) cmd.append(" ") end cmd.append(grammar_filename) log(" [geyacc] " + cmd + "%N") system(cmd) end feature -- geyacc commandline options setters set_verbose_filename(a_verbose_filename : STRING) is -- required require verbose_filename_not_void : a_verbose_filename /= Void verbose_filename_not_empty: not a_verbose_filename.is_empty do verbose_filename := a_verbose_filename end set_separate_actions(a_separate_actions : BOOLEAN) is -- -x option, default: off do separate_actions := a_separate_actions end set_eiffel_tokens_classname(a_eiffel_tokens_classname : STRING) is -- -t option -- if omitted output goes to stdout require eiffel_tokens_classname_not_void : a_eiffel_tokens_classname /= Void eiffel_tokens_classname_not_empty: not a_eiffel_tokens_classname.is_empty do eiffel_tokens_classname := a_eiffel_tokens_classname end set_eiffel_parser_filename(a_eiffel_parser_filename : STRING) is -- -o option -- if omitted output goes to stdout require eiffel_parser_filename_not_void : a_eiffel_parser_filename /= Void eiffel_parser_filename_not_empty: not a_eiffel_parser_filename.is_empty do eiffel_parser_filename := a_eiffel_parser_filename end set_grammar_filename(a_grammar_filename : STRING) is -- required require grammar_filename_not_void : a_grammar_filename /= Void grammar_filename_not_empty: not a_grammar_filename.is_empty do grammar_filename := a_grammar_filename end feature -- geyacc commandline options verbose_filename : STRING -- -v option separate_actions : BOOLEAN -- -x option, default: false eiffel_tokens_classname : STRING -- -t option eiffel_parser_filename : STRING -- -o option grammar_filename : STRING -- required end --- NEW FILE: geant_lcc_command.e --- indexing description: "lcc C-compiler command" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_lcc_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_LCC_COMMAND inherit GEANT_COMMAND creation make feature make is do end execute is require executable_not_void : executable /= Void executable_not_empty: not executable.is_empty sourcefilename_not_void : sourcefilename /= Void sourcefilename_not_empty: not sourcefilename.is_empty local cmd : STRING do cmd := "lcc" cmd.append(" -Fo"); cmd.append(executable) cmd.append(" "); cmd.append(sourcefilename) log(" [lcc] " + cmd + "%N") system(cmd) end set_executable(a_executable : STRING) is require executable_not_void : a_executable /= Void executable_not_empty: not a_executable.is_empty do executable := a_executable end set_sourcefilename(a_sourcefilename : STRING) is require sourcefilename_not_void : a_sourcefilename /= Void sourcefilename_not_empty: not a_sourcefilename.is_empty do sourcefilename := a_sourcefilename end --feature {NONE} executable : STRING -- -Fo sourcefilename : STRING -- end --- NEW FILE: geant_var_command.e --- indexing description: "global variable" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_var_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_VAR_COMMAND inherit GEANT_COMMAND creation make feature make is do end execute is require name_not_void : name /= Void name_not_empty: not name.is_empty do log(" [var] " + name + "=" + value + "%N") vars.force(name, value) -- put the variable in the pool of global variables end set_name(a_name : STRING) is require name_not_void : a_name /= Void name_not_empty: not a_name.is_empty do name := a_name end set_value(a_value : STRING) is require value_not_void : a_value /= Void do value := a_value end --feature {NONE} name : STRING value : STRING end --- NEW FILE: geant_xace_command.e --- indexing description: "xace command" library: "bonbon/geant" author: "Sven Ehrke" id: "$Id: geant_xace_command.e,v 1.1 2001/06/26 17:06:51 svene Exp $" copyright: "" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/26 17:06:51 $" revision: "$Revision: 1.1 $" class GEANT_XACE_COMMAND inherit GEANT_COMMAND creation make feature make is do options := "" compile := false end execute is require command_not_void : command /= Void command_not_empty: not command.is_empty command_options_not_void : command_options /= Void command_options_not_empty: not command_options.is_empty local cmd : STRING do cmd := "xace " cmd.append(options) cmd.append(" --" + command) cmd.append(" --" + command_options) cmd.append(" " + xace_filename) print(" [xace] " + cmd + "%N") system(cmd) if compile then cmd := "compile se.ace" log(" [xace] " + cmd + "%N") system(cmd) end end set_var(a_name, a_value : STRING) is require name_not_void : a_name /= Void name_not_empty: not a_name.is_empty value_not_void : a_value /= Void do vars.force(a_name, a_value) end set_options(a_options : STRING) is require options_not_void : a_options /= Void do options := a_options end set_command(a_command : STRING) is require command_not_void : a_command /= Void command_not_empty: not a_command.is_empty do command := a_command end set_command_options(a_command_options : STRING) is require command_options_not_void : a_command_options /= Void do command_options := a_command_options end set_xace_filename(a_xace_filename : STRING) is require xace_filename_not_void : a_xace_filename /= Void xace_filename_not_empty: not a_xace_filename.is_empty do xace_filename := a_xace_filename end set_compile(a_compile : BOOLEAN) is -- should compilation be started right after generation ?, default: false do compile := a_compile --!!1 print("setting compile to " + compile.out) end vars : DS_HASH_TABLE [STRING, STRING] is once !!Result.make(1) end options : STRING command : STRING command_options : STRING xace_filename : STRING compile : BOOLEAN -- should compilation be started right after generation ? -- default: false -- implementation note: do not use compile as name here, causes conflicts end |
From: Sven E. <sv...@us...> - 2001-06-26 17:05:08
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/task In directory usw-pr-cvs1:/tmp/cvs-serv27044/task Log Message: Directory /cvsroot/gobo-eiffel/gobo/src/geant/task added to the repository |
From: Sven E. <sv...@us...> - 2001-06-26 17:05:08
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/parser In directory usw-pr-cvs1:/tmp/cvs-serv27044/parser Log Message: Directory /cvsroot/gobo-eiffel/gobo/src/geant/parser added to the repository |
From: Sven E. <sv...@us...> - 2001-06-26 17:05:07
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant/command In directory usw-pr-cvs1:/tmp/cvs-serv27044/command Log Message: Directory /cvsroot/gobo-eiffel/gobo/src/geant/command added to the repository |
From: Sven E. <sv...@us...> - 2001-06-26 17:02:50
|
Update of /cvsroot/gobo-eiffel/gobo/src/geant In directory usw-pr-cvs1:/tmp/cvs-serv26584/geant Log Message: Directory /cvsroot/gobo-eiffel/gobo/src/geant added to the repository |
From: majkel k. <maj...@us...> - 2001-06-15 14:45:58
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv19118 Modified Files: uc_representation_utf8.e Log Message: removed errernous precondition in UC_REPRESENTATION_UTF8.add_to_storage_count Index: uc_representation_utf8.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/kernel/unicode/uc_representation_utf8.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** uc_representation_utf8.e 2001/06/15 07:45:20 1.1 --- uc_representation_utf8.e 2001/06/15 14:45:53 1.2 *************** *** 243,248 **** add_to_storage_count (o: INTEGER) is -- shrink or enlarge storage by `o' octets. - require - non_negative: o >= 0; do if o > 0 then --- 243,246 ---- *************** *** 253,257 **** storage_count := storage_count + o ensure ! storage_count = (old storage_count) + o end --- 251,256 ---- storage_count := storage_count + o ensure ! storage_count = (old storage_count) + o; ! non_negative_size: storage_count >= 0; end |
From: majkel k. <maj...@us...> - 2001-06-15 11:31:25
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv13994 Added Files: uc_string.e Log Message: renamed methods *_ucchar to *_uc_character, *_ucstring to *_uc_string --- NEW FILE: uc_string.e --- indexing description: "Sequence of UC_CHARACTERs, accessible through integer indices in a contigous range."; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 11:31:22 $" revision: "$Revision: 1.1 $" class UC_STRING inherit COMPARABLE redefine infix "<=", infix ">", infix ">=", is_equal, three_way_comparison, out, copy end HASHABLE redefine is_equal, out, copy end creation make, make_from_string, make_from_utf8 feature -- Creation frozen make (n: INTEGER) is -- Allocate space for at least `n' characters. require non_negative_size: n >= 0 do i_representation := i_settings.create_representation ensure empty_string: count = 0; -- correctly_allocated_size: capacity >= n; end make_from_string (other: STRING) is -- Initialize from the characters of `other'. -- (Useful in proper descendants of class STRING, -- to initialize a string-like object from a manifest string.) require string_exists: other /= Void; do make(other.count) append_string(other) ensure count_set: count = other.count; end make_from_utf8 (other: STRING) is -- Initialize from the characters of `other' which are -- stored in UFT8-Format require string_exists: other /= Void valid_utf8: valid_utf8(other) local pos: INTEGER do make(other.count) from pos := 1 until pos > other.count loop utf8utils.read_code(other, pos) append_ucc_code(utf8utils.last_code) pos := utf8utils.next_pos end end feature -- Initialization -- from_c (c_string: POINTER) is -- -- not implemented -- require -- C_string_exists: c_string /= void -- do -- --! not implemented -- end frozen remake (n: INTEGER) is -- Allocate space for at least `n' characters. require non_negative_size: n >= 0 do wipe_out ensure empty_string: count = 0 end; feature -- Access hash_code: INTEGER is local i: INTEGER do -- taken from SmallEiffel i := count; if i > 5 then Result := i * item(i).code i := 5 end from until i <= 0 loop Result := Result + item(i).code i := i - 1 end Result := Result * count end index_of (c: UC_CHARACTER; start: INTEGER): INTEGER is -- Position of first occurrence of `c' at or after `start'; -- 0 if none. require start_large_enough: start >= 1 start_small_enough: start <= count local i: INTEGER; do from i := start until i > count or else item_code(i) = c.code loop i := i + 1; end if i<= count then Result := i end ensure non_negative_result: Result >= 0; at_this_position: Result > 0 implies item(Result).code = c.code -- none_before: For every i in start..Result, item (i) /= c -- zero_iff_absent: -- (Result = 0) = For every i in 1..count, item (i) /= c end item, infix "@" (i: INTEGER): UC_CHARACTER is -- Character at position `i' require good_key: valid_index (i) do Result.make_from_integer(item_code(i)) end substring_index (other: UC_STRING; start: INTEGER): INTEGER is -- Position of first occurrence of `other' at or after `start'; -- 0 if none. require start_in_range: valid_index(start); --! mk other_non_void: other /= void; --! mk local i,j: INTEGER; do from i := start until Result /= 0 or else i > count - other.count + 1 loop from j := 1 until j > other.count or else not item(i+j-1).is_equal(other.item(j)) loop j := j + 1; end if j > other.count then Result := i end i := i + 1 end ensure non_negative_result: Result >= 0; -- mk at_this_position: Result > 0 implies substring(Result, Result+other.count-1).is_equal(other);--mk end feature -- Measurement count: INTEGER is -- Actual number of characters making up the string do Result := i_representation.count end occurrences (c: UC_CHARACTER): INTEGER is -- Number of times `c' appears in the string local i: INTEGER do from i := 1 until i > count loop if item_code(i) = c.code then Result := Result + 1 end i := i + 1 end ensure non_negative_occurrences: Result >= 0 end feature -- Comparison is_equal (other: like Current): BOOLEAN is -- Is string made of same character sequence as other? -- (Redefined from `GENERAL') do if Current = other then Result := true else if count = other.count then Result := three_way_comparison(other) = 0 end end end infix "<" (other: like Current): BOOLEAN is do Result := three_way_comparison(other) < 0 end infix "<=" (other: like Current): BOOLEAN is do Result := three_way_comparison(other) <= 0 end infix ">=" (other: like Current): BOOLEAN is do Result := three_way_comparison(other) >= 0 end infix ">" (other: like Current): BOOLEAN is do Result := three_way_comparison(other) > 0 end three_way_comparison (other: like Current): INTEGER is local stop: BOOLEAN i: INTEGER do if Current = other then Result := 0 else from i := 1 until stop or else i > count.min(other.count) loop if item(i) < other.item(i) then Result := -1 stop := true elseif item(i) > other.item(i) then Result := 1 stop := true end i := i + 1 end if Result = 0 then if count > other.count then Result := 1 elseif count < other.count then Result := -1 end end end end feature -- Status report empty: BOOLEAN is -- Is string empty? do Result := count = 0 end valid_index (i: INTEGER): BOOLEAN is -- Is `i' within the bounds of the string? do Result := (1 <= i) and (i <= count) end feature -- Element change append_boolean (b: BOOLEAN) is -- Append the string representation of `b' at end. do append_string(b.out) end append_character (c: CHARACTER) is do append_ucc_code(c.code) ensure item_inserted: item_code(count) = c.code; -- one_more_occurrence: occurrences(c) = old (occurrences(c)) + 1; end append_double (d: DOUBLE) is -- Append the string representation of `d' at end. do append_string(d.out) end append_integer (i: INTEGER) is -- Append the string representation of `i' at end. do append_string(i.out) end append_real (r: REAL) is -- Append the string representation of `r' at end. do append_string(r.out) end append_string (s: STRING) is -- Append a copy of `s' if not void, at end local i: INTEGER do if s /= void then from i := 1 until i > s.count loop append_ucc_code(s.item(i).code) i := i + 1 end end ensure new_count: s /= void and then count = old count + s.count; -- appended: For every `ì' in 1..s.count -- item(old count + 1) = s.item(i) end append_ucchar (c: UC_CHARACTER) is -- Append `c' at end. obsolete "Use `append_uc_character' instead." do append_uc_character(c) end append_uc_character (c: UC_CHARACTER) is -- Append `c' at end. do append_ucc_code(c.code) ensure item_inserted: item(count).code = c.code one_more_occurrence: occurrences (c) = old (occurrences (c)) + 1 -- item_inserted: has (c) end append_ucstring (s: UC_STRING) is -- Append a copy of `s', if not void, at end. obsolete "Use `append_uc_string' instead." do append_uc_string(s) end append_uc_string (s: UC_STRING) is -- Append a copy of `s', if not void, at end. do if s /= void and then not s.empty then i_representation.insert(count+1, s.i_representation, 1, s.count) end ensure new_count: count = (old count) + s.count -- appended: For every i in 1.. s.count, -- item (old count + i) = s.item (i) end fill (c: UC_CHARACTER) is -- Replace every character with `c'. local i: INTEGER; do from i := 1 until i > count loop put_code(c.code, i) i := i + 1 end ensure -- allblank: For every i in 1..count, item (i) = Blank end head (n: INTEGER) is -- Remove all characters except for the first `n'; -- do nothing if `n' >= count. require non_negative_argument: n >= 0 do if n < count then remove_between(n+1, count) end ensure new_count: count = n.min (old count) -- first_kept: For every i in 1..n, item (i) = old item (i) end insert (s: like Current; i: INTEGER) is -- Add `s' to the left of position `i'. require string_exists: s /= Void; index_small_enough: i <= count; index_large_enough: i > 0 do if not s.empty then i_representation.insert(i, s.i_representation, 1, s.count) end ensure new_count: count = old count + s.count end insert_ucchar (c: UC_CHARACTER; i: INTEGER) is obsolete "Use `insert_uc_character' instead" do insert_uc_character(c, i) end insert_uc_character (c: UC_CHARACTER; i: INTEGER) is -- Add `c' to the left of position `i'. do i_representation.insert_code(c.code, i) ensure new_count: count = old count + 1 end left_adjust is -- Remove leading white space. local i: INTEGER do from i := 1 until i > count or else not is_whitespace(item(i).code) loop i := i + 1 end if i > 1 then i_representation.remove(1, i-1) end ensure --! new_count: (count /= 0) implies (item(1).code /= (' ').code) end put (c: UC_CHARACTER; i: INTEGER) is -- Replace character at position `i' by `c'. require good_key: valid_index (i) do put_code(c.code, i); ensure insertion_done: item(i).code = c.code end -- put_substring (s: like Current; start_pos, end_pos: INTEGER) is -- -- Copy the characters of `s' to positions -- -- `start_pos' .. `end_pos'. -- require -- string_exists: s /= Void; -- index_small_enough: end_pos <= count; -- order_respected: start_pos <= end_pos; -- index_large_enough: start_pos > 0 -- local -- i: INTEGER -- do -- --!!!!! completely unclear -- from -- i := 0 -- until -- i > s.count.min(end_pos - start_pos + 1) -- loop -- i_storage.put(s.i_storage.item(i+1), i) -- i := i + 1 -- end -- ensure -- new_count: count = old count + s.count - end_pos + start_pos - 1 -- end right_adjust is -- Remove trailing white space. local i: INTEGER do from i := count until i <= 0 or else not is_whitespace(item(i).code) loop i := i - 1 end if i < count then remove_between(i+1,count) end ensure --! new_count: (count /= 0) implies (item(count).code /= (' ').code) end tail (n: INTEGER) is -- Remove all characters except for the last `n'; -- do nothing if `n' >= count. require non_negative_argument: n >= 0 do if n < count then remove_between(1,count-n) end ensure new_count: count = n.min (old count) end feature -- Removal remove (i: INTEGER) is -- Remove `i'-th character. require index_small_enough: i <= count; index_large_enough: i > 0 do remove_between(i, i) ensure new_count: count = old count - 1 end wipe_out is -- Remove all characters. do if not empty then remove_between(1, count) end ensure empty_string: count = 0; wiped_out: empty end feature -- Resizing resize (newsize: INTEGER) is -- Rearrange string so that it can accommodate -- at least newsize characters. -- Do not lose any previously entered character. require new_size_non_negative: newsize >= 0 local i: INTEGER do --? what's the correct definition of this method? if newsize > count then from i := newsize - count until i = 0 loop append_ucc_code((' ').code) i := i - 1 end elseif newsize < count then head (newsize) end end feature -- Conversion -- to_boolean: BOOLEAN is -- -- Boolean value; -- -- "true" yields true, "false" yields false -- -- (case-insensitive) -- do -- --! TBD -- end -- to_double: DOUBLE is -- -- "Double" value; for example, when applied to "123.0", -- -- will yield 123.0 (double) -- do -- --! TBD -- end to_integer: INTEGER is -- Integer value; -- for example, when applied to "123", will yield 123 local i: INTEGER last_character: INTEGER state: INTEGER; sign: BOOLEAN; last_integer: INTEGER -- state = 0 : waiting sign or first digit. -- state = 1 : sign read, waiting first digit. -- state = 2 : in the number. -- state = 3 : end state. -- state = 4 : error state. do -- taken from SmallEiffel from i := 1 until i > count or state > 2 loop last_character := item(i).code inspect state when 0 then if is_whitespace(last_character) then elseif is_digit(last_character) then last_integer := int_value(last_character) state := 2; elseif last_character = ('-').code then sign := true; state := 1; elseif last_character = ('+').code then state := 1; else state := 4; end; when 1 then if is_whitespace(last_character) then elseif is_digit(last_character) then last_integer := int_value(last_character) state := 2; else state := 4; end; else -- 2 if is_digit(last_character) then last_integer := (last_integer * 10) + int_value(last_character) else state := 3; end; end; if i = count then inspect state when 0 .. 1 then state := 4; when 2 .. 3 then state := 3; else -- 4 end; end; i := i + 1 end debug if state = 4 then io.error.put_string("Error in UC_STRING.to_integer.%N"); --crash; end; end; if sign then last_integer := - last_integer; end; Result := last_integer end to_lower is -- Convert to lower case. local i: INTEGER ucc: UC_CHARACTER do from i := 1 until i > count loop ucc := item(i) ucc.to_lower put(ucc, i) i := i + 1 end end to_title is -- Convert to title case. local i: INTEGER ucc: UC_CHARACTER do from i := 1 until i > count loop ucc := item(i) ucc.to_title put(ucc, i) i := i + 1 end end -- to_real: REAL is -- -- Real value; -- -- for example, when applied to "123.0", will yield 123.0 -- do -- --! TBD -- end to_upper is -- Convert to upper case. local i: INTEGER ucc: UC_CHARACTER do from i := 1 until i > count loop ucc := item(i) ucc.to_upper put(ucc, i) i := i + 1 end end to_utf8: STRING is -- Conversion to UTF-8 (as defined by RFC 2279) local i,c,pos: INTEGER do !!Result.make(count) -- Visual Eiffel makes things a little bit complicated if Result.count /= 0 then Result.wipe_out end from i := 1 until i > count loop c := item(i).code pos := Result.count + 1 utf8utils.put_code(c, Result, pos) i := i + 1 end ensure result_not_void: Result /= Void end feature -- Duplication copy (other: like Current) is do -- we can't wipe_out representation, if available, for it is -- the same as other.i_reprresentation for VE. have to -- reread the clone semantics i_representation := i_settings.create_representation if not other.empty then i_representation.insert(1, other.i_representation, 1, other.count) end end substring (n1, n2: INTEGER): like Current is -- Copy of substring containing all characters at indices -- between `n1' and `n2' require meaningful_origin: 1 <= n1; meaningful_interval: n1 <= n2; meaningful_end: n2 <= count local i: INTEGER do !!Result.make(n2-n1+1) from i := n1 until i > n2 loop Result.append_ucc_code(item_code(i)) i := i + 1 end ensure new_result_count: Result.count = n2 - n1 + 1 -- original_characters: For every i in 1..n2-n1, -- Result.item (i) = item (n1 + i -1) end feature -- Output out: STRING is --| characters with code >= 256 will be represented as --| "\uxxxx;", where "xxxx" is the hexadecimal --| representation of code. local i: INTEGER do !!Result.make(0) from i := 1 until i > count loop Result.append_string(item(i).out) i := i + 1 end end valid_utf8 (s: STRING): BOOLEAN is -- is `s' a valid UTF8-representation. --| this will not check all errors! require string_exists: s /= void; do Result := utf8utils.valid_utf8(s, 1, s.count) end feature {UC_STRING} -- Implementation utf8utils: UC_UTF8_UTILS is once !!Result end remove_between (p_from, p_end: INTEGER) is require valid_index(p_from); valid_index(p_end); p_from <= p_end; do i_representation.remove(p_from, p_end-p_from+1) end feature{UC_STRING} item_code (i: INTEGER): INTEGER is do Result := i_representation.item_code(i) end put_code (c, i: INTEGER) is do i_representation.put_code(c,i) end append_ucc_code(n: INTEGER) is -- append single ucchar with code `n' require is_unicode: 0 <= n and n <= maximum_uc_character_code do i_representation.insert_code(n,count+1) ensure count = (old count) + 1; end is_whitespace (i: INTEGER): BOOLEAN is -- is character with code `i' a whitespace? do inspect i when 32, 9, 10, 12, 13 then Result := true else Result := false end end is_digit (i: INTEGER): BOOLEAN is -- is character with code `i' a digit? do if i >= ('0').code and i <= ('9').code then Result := true end end int_value (code: INTEGER): INTEGER is -- return the value of integer `code'. require is_digit: is_digit(code) do Result := code - ('0').code end maximum_uc_character_code: INTEGER is local ucc: UC_CHARACTER once Result := ucc.maximum_uc_character_code end feature {UC_STRING} -- representation i_representation: UC_REPRESENTATION i_settings: UC_SETTINGS is once !!Result end invariant empty_definition : empty = (count = 0); non_negative_count : count >= 0; end -- class UC_STRING |
From: majkel k. <maj...@us...> - 2001-06-15 11:30:06
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv13799 Modified Files: uc_character_ref.e Log Message: fixed method name in KL_INTEGER_ROUTINES Index: uc_character_ref.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/kernel/unicode/uc_character_ref.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** uc_character_ref.e 2001/06/13 12:07:28 1.1 --- uc_character_ref.e 2001/06/15 11:30:04 1.2 *************** *** 189,193 **** -- convert code position `i' to `CHARACTER' do ! Result := specific.code_to_character(i) end --- 189,193 ---- -- convert code position `i' to `CHARACTER' do ! Result := specific.to_character(i) end |
From: majkel k. <maj...@us...> - 2001-06-15 11:29:21
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv13674 Modified Files: uc_representation.e Log Message: fixed some typos Index: uc_representation.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/kernel/unicode/uc_representation.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** uc_representation.e 2001/06/15 07:45:20 1.1 --- uc_representation.e 2001/06/15 11:29:18 1.2 *************** *** 72,76 **** require valid_idx: valid_index(idx) or else idx = count + 1; ! valid code: valid_ocde(code); deferred ensure --- 72,76 ---- require valid_idx: valid_index(idx) or else idx = count + 1; ! valid_code: valid_code(code); deferred ensure |
From: majkel k. <maj...@us...> - 2001-06-15 11:16:43
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv11737 Modified Files: uc_ctype_bidi.e Log Message: change bidi_* constants to lowercase. now even -case_insensitive in SmallEiffel will work. Index: uc_ctype_bidi.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/kernel/unicode/uc_ctype_bidi.e,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** uc_ctype_bidi.e 2001/06/15 10:12:31 1.1 --- uc_ctype_bidi.e 2001/06/15 11:16:40 1.2 *************** *** 28,95 **** once Result := << ! bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Boundary_Neutral,bidi_Segment_Separator,bidi_Paragraph_Separator,bidi_Segment_Separator, ! bidi_Whitespace,bidi_Paragraph_Separator,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral,bidi_Boundary_Neutral, ! bidi_Paragraph_Separator,bidi_Paragraph_Separator,bidi_Paragraph_Separator,bidi_Segment_Separator, [...5780 lines suppressed...] ! bidi_left_to_right,bidi_left_to_right,bidi_left_to_right,bidi_left_to_right, ! bidi_left_to_right,bidi_left_to_right,bidi_left_to_right,bidi_no_information, ! bidi_no_information,bidi_no_information,bidi_left_to_right,bidi_left_to_right, ! bidi_left_to_right,bidi_left_to_right,bidi_left_to_right,bidi_left_to_right, ! bidi_no_information,bidi_no_information,bidi_left_to_right,bidi_left_to_right, ! bidi_left_to_right,bidi_left_to_right,bidi_left_to_right,bidi_left_to_right, ! bidi_no_information,bidi_no_information,bidi_left_to_right,bidi_left_to_right, ! bidi_left_to_right,bidi_left_to_right,bidi_left_to_right,bidi_left_to_right, ! bidi_no_information,bidi_no_information,bidi_left_to_right,bidi_left_to_right, ! bidi_left_to_right,bidi_no_information,bidi_no_information,bidi_no_information, ! bidi_european_number_terminator,bidi_european_number_terminator,bidi_other_neutrals,bidi_other_neutrals, ! bidi_other_neutrals,bidi_european_number_terminator,bidi_european_number_terminator,bidi_no_information, ! bidi_other_neutrals,bidi_other_neutrals,bidi_other_neutrals,bidi_other_neutrals, ! bidi_other_neutrals,bidi_other_neutrals,bidi_other_neutrals,bidi_no_information, bidi_no_information,bidi_no_information,bidi_no_information,bidi_no_information, bidi_no_information,bidi_no_information,bidi_no_information,bidi_no_information, ! bidi_no_information,bidi_boundary_neutral,bidi_boundary_neutral,bidi_boundary_neutral, ! bidi_other_neutrals,bidi_other_neutrals,bidi_no_information,bidi_no_information >> end |
From: majkel k. <maj...@us...> - 2001-06-15 10:12:42
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv1409 Added Files: uc_constants.e uc_ctype.e uc_ctype_bidi.e uc_ctype_categories.e uc_ctype_lowercase.e uc_ctype_titlecase.e uc_ctype_uppercase.e uc_settings.e Log Message: adding unicode database related classes --- NEW FILE: uc_constants.e --- indexing description: "Unicode Constants (General Categories, ...)"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" class UC_CONSTANTS feature -- Categories gc_no_category: INTEGER is 0 -- No Category given gc_mark_nonspacing: INTEGER is 1 -- Category Mn gc_mark_space_combining: INTEGER is 2 -- Category Mc gc_mark_enclosing: INTEGER is 3 -- Catgeory Me gc_number_decimal_digit: INTEGER is 4 -- Category Nd gc_number_letter: INTEGER is 5 -- Category Nl gc_number_other: INTEGER is 6 -- Category No gc_separator_space: INTEGER is 7 -- Category Zs gc_separator_line: INTEGER is 8 -- Category Zl gc_separator_paragraph: INTEGER is 9 -- Category Zp gc_other_control: INTEGER is 10 -- Category Cc gc_other_format: INTEGER is 11 -- Category Cf gc_other_surrogate: INTEGER is 12 -- Category Cs gc_other_private_use: INTEGER is 13 -- Category Co gc_other_not_assigned: INTEGER is 14 -- Category Cn gc_letter_uppercase: INTEGER is 15 -- Category Lu gc_letter_lowercase: INTEGER is 16 -- Category Ll gc_letter_titlecase: INTEGER is 17 -- Category Lt gc_letter_modifier: INTEGER is 18 -- informative Category Lm gc_letter_other: INTEGER is 19 -- informative Category Lo gc_punctuation_connector: INTEGER is 20 -- informative Category Pc gc_punctuation_dash: INTEGER is 21 -- informative Category Pd gc_punctuation_open: INTEGER is 22 -- informative Category Ps gc_punctuation_close: INTEGER is 23 -- informative Category Pe gc_punctuation_initial_quote: INTEGER is 24 -- informative Category Pi gc_punctuation_final_quote: INTEGER is 25 -- informative Category Pf gc_punctuation_other: INTEGER is 26 -- informative Category Po gc_symbol_math: INTEGER is 27 -- informative category Sm gc_symbol_currency: INTEGER is 28 -- informative category Sc gc_symbol_modifier: INTEGER is 29 -- informative category Sk gc_symbol_other: INTEGER is 30 -- informative category So feature -- BiDI bidi_left_to_right: INTEGER is 1 -- BiDi Category bidi_left_to_right_embedding: INTEGER is 2 -- BiDi Category bidi_left_to_right_override: INTEGER is 3 -- BiDi Category bidi_right_to_left: INTEGER is 4 -- BiDi Category bidi_right_to_left_arabic: INTEGER is 5 -- BiDi Category bidi_right_to_left_embedding: INTEGER is 6 -- BiDi Category bidi_right_to_left_override: INTEGER is 7 -- BiDi Category bidi_pop_directional_format: INTEGER is 8 -- BiDi Category bidi_european_number: INTEGER is 9 -- BiDi Category bidi_european_number_separator: INTEGER is 10 -- BiDi Category bidi_european_number_terminator: INTEGER is 11 -- BiDi Category bidi_arabic_number: INTEGER is 12 -- BiDi Category bidi_common_number_separator: INTEGER is 13 -- BiDi Category bidi_non_spacing_mark: INTEGER is 14 -- BiDi Category bidi_boundary_neutral: INTEGER is 15 -- BiDi Category bidi_paragraph_separator: INTEGER is 16 -- BiDi Category bidi_segment_separator: INTEGER is 17 -- BiDi Category bidi_whitespace: INTEGER is 18 -- BiDi Category bidi_other_neutrals: INTEGER is 19 -- BiDi Category bidi_no_information: INTEGER is -1 -- BiDi Category end -- class UC_CONSTANTS --- NEW FILE: uc_ctype.e --- indexing description: "Unicode Database"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" class UC_CTYPE inherit UC_CONSTANTS end UC_CTYPE_CATEGORIES end UC_CTYPE_BIDI end UC_CTYPE_UPPERCASE end UC_CTYPE_LOWERCASE end UC_CTYPE_TITLECASE end feature to_lower(ucc: UC_CHARACTER): UC_CHARACTER is -- convert `ucc' to lower. if there is no equivalent lower -- character, return `ucc' itself. local code: INTEGER do code := lowercase.item(ucc.code//256+1).item(ucc.code\\256+1) if code = -1 then Result := ucc else Result.set_code(code) end end to_upper(ucc: UC_CHARACTER): UC_CHARACTER is -- convert `ucc' to upper. if there is no equivalent upper -- character, return `ucc' itself. local code: INTEGER do code := uppercase.item(ucc.code//256+1).item(ucc.code\\256+1) if code = -1 then Result := ucc else Result.set_code(code) end end to_title(ucc: UC_CHARACTER): UC_CHARACTER is -- convert `ucc' to title. if there is no equivalent title -- character, return `ucc' itself. local code: INTEGER do code := titlecase.item(ucc.code//256+1).item(ucc.code\\256+1) if code = -1 then Result := ucc else Result.set_code(code) end end general_category (ucc: UC_CHARACTER): INTEGER is -- return character's general category. if there is no -- category, `gc_no_category' will be returned. do Result := category.item(ucc.code // 256+1).item(ucc.code \\ 256+1) end end -- class UC_CTYPE --- NEW FILE: uc_ctype_bidi.e --- indexing description: "bidi database"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" note: "This file generated by a script from the Unicode % %database and beautified by hand and emacs"; class UC_CTYPE_BIDI inherit [...3841 lines suppressed...] bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_d7, bidi_34,bidi_08,bidi_08,bidi_db, bidi_34,bidi_08,bidi_08,bidi_df, bidi_34,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_08,bidi_08,bidi_08,bidi_08, bidi_df,bidi_01,bidi_fa,bidi_fb, bidi_fc,bidi_fd,bidi_fe,bidi_ff >> end --integer used: 14080 end -- class UC_CTYPE_BIDI --- NEW FILE: uc_ctype_categories.e --- indexing description: "General category database"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" note: "This file generated by a script from the Unicode % %database and beautified by hand and emacs"; class UC_CTYPE_CATEGORIES inherit [...4049 lines suppressed...] category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_d7, category_d8,category_08,category_08,category_db, category_d8,category_08,category_08,category_df, category_e0,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_08,category_08,category_08,category_08, category_f8,category_15,category_fa,category_fb, category_15,category_fd,category_fe,category_ff >> end -- integers used: 14848 end -- class UC_CTYPE_CATEGORIES --- NEW FILE: uc_ctype_lowercase.e --- indexing description: "database for mapping to lowercase"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" note: "This file generated by a script from the Unicode % %database and beautified by hand and emacs"; class UC_CTYPE_LOWERCASE inherit UC_CONSTANTS end feature{UC_CTYPE} -- Lowercase conversion tables lowercase_00: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,97,98,99, 100,101,102,103, 104,105,106,107, 108,109,110,111, 112,113,114,115, 116,117,118,119, 120,121,122,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 224,225,226,227, 228,229,230,231, 232,233,234,235, 236,237,238,239, 240,241,242,243, 244,245,246,-1, 248,249,250,251, 252,253,254,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_01: ARRAY[INTEGER] is once Result := << 257,-1,259,-1, 261,-1,263,-1, 265,-1,267,-1, 269,-1,271,-1, 273,-1,275,-1, 277,-1,279,-1, 281,-1,283,-1, 285,-1,287,-1, 289,-1,291,-1, 293,-1,295,-1, 297,-1,299,-1, 301,-1,303,-1, 105,-1,307,-1, 309,-1,311,-1, -1,314,-1,316, -1,318,-1,320, -1,322,-1,324, -1,326,-1,328, -1,-1,331,-1, 333,-1,335,-1, 337,-1,339,-1, 341,-1,343,-1, 345,-1,347,-1, 349,-1,351,-1, 353,-1,355,-1, 357,-1,359,-1, 361,-1,363,-1, 365,-1,367,-1, 369,-1,371,-1, 373,-1,375,-1, 255,378,-1,380, -1,382,-1,-1, -1,595,387,-1, 389,-1,596,392, -1,598,599,396, -1,-1,477,601, 603,402,-1,608, 611,-1,617,616, 409,-1,-1,-1, 623,626,-1,629, 417,-1,419,-1, 421,-1,640,424, -1,643,-1,-1, 429,-1,648,432, -1,650,651,436, -1,438,-1,658, 441,-1,-1,-1, 445,-1,-1,-1, -1,-1,-1,-1, 454,454,-1,457, 457,-1,460,460, -1,462,-1,464, -1,466,-1,468, -1,470,-1,472, -1,474,-1,476, -1,-1,479,-1, 481,-1,483,-1, 485,-1,487,-1, 489,-1,491,-1, 493,-1,495,-1, -1,499,499,-1, 501,-1,405,447, 505,-1,507,-1, 509,-1,511,-1 >> end lowercase_02: ARRAY[INTEGER] is once Result := << 513,-1,515,-1, 517,-1,519,-1, 521,-1,523,-1, 525,-1,527,-1, 529,-1,531,-1, 533,-1,535,-1, 537,-1,539,-1, 541,-1,543,-1, -1,-1,547,-1, 549,-1,551,-1, 553,-1,555,-1, 557,-1,559,-1, 561,-1,563,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_03: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,940,-1, 941,942,943,-1, 972,-1,973,974, -1,945,946,947, 948,949,950,951, 952,953,954,955, 956,957,958,959, 960,961,-1,963, 964,965,966,967, 968,969,970,971, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,987,-1, 989,-1,991,-1, 993,-1,995,-1, 997,-1,999,-1, 1001,-1,1003,-1, 1005,-1,1007,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_04: ARRAY[INTEGER] is once Result := << 1104,1105,1106,1107, 1108,1109,1110,1111, 1112,1113,1114,1115, 1116,1117,1118,1119, 1072,1073,1074,1075, 1076,1077,1078,1079, 1080,1081,1082,1083, 1084,1085,1086,1087, 1088,1089,1090,1091, 1092,1093,1094,1095, 1096,1097,1098,1099, 1100,1101,1102,1103, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 1121,-1,1123,-1, 1125,-1,1127,-1, 1129,-1,1131,-1, 1133,-1,1135,-1, 1137,-1,1139,-1, 1141,-1,1143,-1, 1145,-1,1147,-1, 1149,-1,1151,-1, 1153,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 1165,-1,1167,-1, 1169,-1,1171,-1, 1173,-1,1175,-1, 1177,-1,1179,-1, 1181,-1,1183,-1, 1185,-1,1187,-1, 1189,-1,1191,-1, 1193,-1,1195,-1, 1197,-1,1199,-1, 1201,-1,1203,-1, 1205,-1,1207,-1, 1209,-1,1211,-1, 1213,-1,1215,-1, -1,1218,-1,1220, -1,-1,-1,1224, -1,-1,-1,1228, -1,-1,-1,-1, 1233,-1,1235,-1, 1237,-1,1239,-1, 1241,-1,1243,-1, 1245,-1,1247,-1, 1249,-1,1251,-1, 1253,-1,1255,-1, 1257,-1,1259,-1, 1261,-1,1263,-1, 1265,-1,1267,-1, 1269,-1,-1,-1, 1273,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_05: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,1377,1378,1379, 1380,1381,1382,1383, 1384,1385,1386,1387, 1388,1389,1390,1391, 1392,1393,1394,1395, 1396,1397,1398,1399, 1400,1401,1402,1403, 1404,1405,1406,1407, 1408,1409,1410,1411, 1412,1413,1414,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_06: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_1e: ARRAY[INTEGER] is once Result := << 7681,-1,7683,-1, 7685,-1,7687,-1, 7689,-1,7691,-1, 7693,-1,7695,-1, 7697,-1,7699,-1, 7701,-1,7703,-1, 7705,-1,7707,-1, 7709,-1,7711,-1, 7713,-1,7715,-1, 7717,-1,7719,-1, 7721,-1,7723,-1, 7725,-1,7727,-1, 7729,-1,7731,-1, 7733,-1,7735,-1, 7737,-1,7739,-1, 7741,-1,7743,-1, 7745,-1,7747,-1, 7749,-1,7751,-1, 7753,-1,7755,-1, 7757,-1,7759,-1, 7761,-1,7763,-1, 7765,-1,7767,-1, 7769,-1,7771,-1, 7773,-1,7775,-1, 7777,-1,7779,-1, 7781,-1,7783,-1, 7785,-1,7787,-1, 7789,-1,7791,-1, 7793,-1,7795,-1, 7797,-1,7799,-1, 7801,-1,7803,-1, 7805,-1,7807,-1, 7809,-1,7811,-1, 7813,-1,7815,-1, 7817,-1,7819,-1, 7821,-1,7823,-1, 7825,-1,7827,-1, 7829,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 7841,-1,7843,-1, 7845,-1,7847,-1, 7849,-1,7851,-1, 7853,-1,7855,-1, 7857,-1,7859,-1, 7861,-1,7863,-1, 7865,-1,7867,-1, 7869,-1,7871,-1, 7873,-1,7875,-1, 7877,-1,7879,-1, 7881,-1,7883,-1, 7885,-1,7887,-1, 7889,-1,7891,-1, 7893,-1,7895,-1, 7897,-1,7899,-1, 7901,-1,7903,-1, 7905,-1,7907,-1, 7909,-1,7911,-1, 7913,-1,7915,-1, 7917,-1,7919,-1, 7921,-1,7923,-1, 7925,-1,7927,-1, 7929,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_1f: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, 7936,7937,7938,7939, 7940,7941,7942,7943, -1,-1,-1,-1, -1,-1,-1,-1, 7952,7953,7954,7955, 7956,7957,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 7968,7969,7970,7971, 7972,7973,7974,7975, -1,-1,-1,-1, -1,-1,-1,-1, 7984,7985,7986,7987, 7988,7989,7990,7991, -1,-1,-1,-1, -1,-1,-1,-1, 8000,8001,8002,8003, 8004,8005,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,8017,-1,8019, -1,8021,-1,8023, -1,-1,-1,-1, -1,-1,-1,-1, 8032,8033,8034,8035, 8036,8037,8038,8039, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8064,8065,8066,8067, 8068,8069,8070,8071, -1,-1,-1,-1, -1,-1,-1,-1, 8080,8081,8082,8083, 8084,8085,8086,8087, -1,-1,-1,-1, -1,-1,-1,-1, 8096,8097,8098,8099, 8100,8101,8102,8103, -1,-1,-1,-1, -1,-1,-1,-1, 8112,8113,8048,8049, 8115,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8050,8051,8052,8053, 8131,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8144,8145,8054,8055, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8160,8161,8058,8059, 8165,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8056,8057,8060,8061, 8179,-1,-1,-1 >> end lowercase_21: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,969,-1, -1,-1,107,229, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8560,8561,8562,8563, 8564,8565,8566,8567, 8568,8569,8570,8571, 8572,8573,8574,8575, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_24: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,9424,9425, 9426,9427,9428,9429, 9430,9431,9432,9433, 9434,9435,9436,9437, 9438,9439,9440,9441, 9442,9443,9444,9445, 9446,9447,9448,9449, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase_ff: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,65345,65346,65347, 65348,65349,65350,65351, 65352,65353,65354,65355, 65356,65357,65358,65359, 65360,65361,65362,65363, 65364,65365,65366,65367, 65368,65369,65370,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end lowercase: ARRAY[ARRAY[INTEGER]] is once Result := << lowercase_00,lowercase_01,lowercase_02,lowercase_03, lowercase_04,lowercase_05,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_1e,lowercase_1f, lowercase_06,lowercase_21,lowercase_06,lowercase_06, lowercase_24,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_06, lowercase_06,lowercase_06,lowercase_06,lowercase_ff >> end --integer used: 3328 end -- class UC_CTYPE_LOWERCASE --- NEW FILE: uc_ctype_titlecase.e --- indexing description: "database for mapping to titlecase"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" note: "This file generated by a script from the Unicode % %database and beautified by hand and emacs"; class UC_CTYPE_TITLECASE inherit UC_CONSTANTS end feature {UC_CTYPE} -- Titlecase conversion tables titlecase_00: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,65,66,67, 68,69,70,71, 72,73,74,75, 76,77,78,79, 80,81,82,83, 84,85,86,87, 88,89,90,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,924,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 192,193,194,195, 196,197,198,199, 200,201,202,203, 204,205,206,207, 208,209,210,211, 212,213,214,-1, 216,217,218,219, 220,221,222,376 >> end titlecase_01: ARRAY[INTEGER] is once Result := << -1,256,-1,258, -1,260,-1,262, -1,264,-1,266, -1,268,-1,270, -1,272,-1,274, -1,276,-1,278, -1,280,-1,282, -1,284,-1,286, -1,288,-1,290, -1,292,-1,294, -1,296,-1,298, -1,300,-1,302, -1,73,-1,306, -1,308,-1,310, -1,-1,313,-1, 315,-1,317,-1, 319,-1,321,-1, 323,-1,325,-1, 327,-1,-1,330, -1,332,-1,334, -1,336,-1,338, -1,340,-1,342, -1,344,-1,346, -1,348,-1,350, -1,352,-1,354, -1,356,-1,358, -1,360,-1,362, -1,364,-1,366, -1,368,-1,370, -1,372,-1,374, -1,-1,377,-1, 379,-1,381,83, -1,-1,-1,386, -1,388,-1,-1, 391,-1,-1,-1, 395,-1,-1,-1, -1,-1,401,-1, -1,502,-1,-1, -1,408,-1,-1, -1,-1,-1,-1, -1,416,-1,418, -1,420,-1,-1, 423,-1,-1,-1, -1,428,-1,-1, 431,-1,-1,-1, 435,-1,437,-1, -1,440,-1,-1, -1,444,-1,503, -1,-1,-1,-1, 453,-1,453,456, -1,456,459,-1, 459,-1,461,-1, 463,-1,465,-1, 467,-1,469,-1, 471,-1,473,-1, 475,398,-1,478, -1,480,-1,482, -1,484,-1,486, -1,488,-1,490, -1,492,-1,494, -1,498,-1,498, -1,500,-1,-1, -1,504,-1,506, -1,508,-1,510 >> end titlecase_02: ARRAY[INTEGER] is once Result := << -1,512,-1,514, -1,516,-1,518, -1,520,-1,522, -1,524,-1,526, -1,528,-1,530, -1,532,-1,534, -1,536,-1,538, -1,540,-1,542, -1,-1,-1,546, -1,548,-1,550, -1,552,-1,554, -1,556,-1,558, -1,560,-1,562, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,385, 390,-1,393,394, -1,399,-1,400, -1,-1,-1,-1, 403,-1,-1,404, -1,-1,-1,-1, 407,406,-1,-1, -1,-1,-1,412, -1,-1,413,-1, -1,415,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 422,-1,-1,425, -1,-1,-1,-1, 430,-1,433,434, -1,-1,-1,-1, -1,-1,439,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_03: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,921,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 902,904,905,906, -1,913,914,915, 916,917,918,919, 920,921,922,923, 924,925,926,927, 928,929,931,931, 932,933,934,935, 936,937,938,939, 908,910,911,-1, 914,920,-1,-1, -1,934,928,-1, -1,-1,-1,986, -1,988,-1,990, -1,992,-1,994, -1,996,-1,998, -1,1000,-1,1002, -1,1004,-1,1006, 922,929,931,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_04: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 1040,1041,1042,1043, 1044,1045,1046,1047, 1048,1049,1050,1051, 1052,1053,1054,1055, 1056,1057,1058,1059, 1060,1061,1062,1063, 1064,1065,1066,1067, 1068,1069,1070,1071, 1024,1025,1026,1027, 1028,1029,1030,1031, 1032,1033,1034,1035, 1036,1037,1038,1039, -1,1120,-1,1122, -1,1124,-1,1126, -1,1128,-1,1130, -1,1132,-1,1134, -1,1136,-1,1138, -1,1140,-1,1142, -1,1144,-1,1146, -1,1148,-1,1150, -1,1152,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,1164,-1,1166, -1,1168,-1,1170, -1,1172,-1,1174, -1,1176,-1,1178, -1,1180,-1,1182, -1,1184,-1,1186, -1,1188,-1,1190, -1,1192,-1,1194, -1,1196,-1,1198, -1,1200,-1,1202, -1,1204,-1,1206, -1,1208,-1,1210, -1,1212,-1,1214, -1,-1,1217,-1, 1219,-1,-1,-1, 1223,-1,-1,-1, 1227,-1,-1,-1, -1,1232,-1,1234, -1,1236,-1,1238, -1,1240,-1,1242, -1,1244,-1,1246, -1,1248,-1,1250, -1,1252,-1,1254, -1,1256,-1,1258, -1,1260,-1,1262, -1,1264,-1,1266, -1,1268,-1,-1, -1,1272,-1,-1, -1,-1,-1,-1 >> end titlecase_05: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,1329,1330,1331, 1332,1333,1334,1335, 1336,1337,1338,1339, 1340,1341,1342,1343, 1344,1345,1346,1347, 1348,1349,1350,1351, 1352,1353,1354,1355, 1356,1357,1358,1359, 1360,1361,1362,1363, 1364,1365,1366,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_06: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_1e: ARRAY[INTEGER] is once Result := << -1,7680,-1,7682, -1,7684,-1,7686, -1,7688,-1,7690, -1,7692,-1,7694, -1,7696,-1,7698, -1,7700,-1,7702, -1,7704,-1,7706, -1,7708,-1,7710, -1,7712,-1,7714, -1,7716,-1,7718, -1,7720,-1,7722, -1,7724,-1,7726, -1,7728,-1,7730, -1,7732,-1,7734, -1,7736,-1,7738, -1,7740,-1,7742, -1,7744,-1,7746, -1,7748,-1,7750, -1,7752,-1,7754, -1,7756,-1,7758, -1,7760,-1,7762, -1,7764,-1,7766, -1,7768,-1,7770, -1,7772,-1,7774, -1,7776,-1,7778, -1,7780,-1,7782, -1,7784,-1,7786, -1,7788,-1,7790, -1,7792,-1,7794, -1,7796,-1,7798, -1,7800,-1,7802, -1,7804,-1,7806, -1,7808,-1,7810, -1,7812,-1,7814, -1,7816,-1,7818, -1,7820,-1,7822, -1,7824,-1,7826, -1,7828,-1,-1, -1,-1,-1,7776, -1,-1,-1,-1, -1,7840,-1,7842, -1,7844,-1,7846, -1,7848,-1,7850, -1,7852,-1,7854, -1,7856,-1,7858, -1,7860,-1,7862, -1,7864,-1,7866, -1,7868,-1,7870, -1,7872,-1,7874, -1,7876,-1,7878, -1,7880,-1,7882, -1,7884,-1,7886, -1,7888,-1,7890, -1,7892,-1,7894, -1,7896,-1,7898, -1,7900,-1,7902, -1,7904,-1,7906, -1,7908,-1,7910, -1,7912,-1,7914, -1,7916,-1,7918, -1,7920,-1,7922, -1,7924,-1,7926, -1,7928,-1,-1, -1,-1,-1,-1 >> end titlecase_1f: ARRAY[INTEGER] is once Result := << 7944,7945,7946,7947, 7948,7949,7950,7951, -1,-1,-1,-1, -1,-1,-1,-1, 7960,7961,7962,7963, 7964,7965,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 7976,7977,7978,7979, 7980,7981,7982,7983, -1,-1,-1,-1, -1,-1,-1,-1, 7992,7993,7994,7995, 7996,7997,7998,7999, -1,-1,-1,-1, -1,-1,-1,-1, 8008,8009,8010,8011, 8012,8013,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,8025,-1,8027, -1,8029,-1,8031, -1,-1,-1,-1, -1,-1,-1,-1, 8040,8041,8042,8043, 8044,8045,8046,8047, -1,-1,-1,-1, -1,-1,-1,-1, 8122,8123,8136,8137, 8138,8139,8154,8155, 8184,8185,8170,8171, 8186,8187,-1,-1, 8072,8073,8074,8075, 8076,8077,8078,8079, -1,-1,-1,-1, -1,-1,-1,-1, 8088,8089,8090,8091, 8092,8093,8094,8095, -1,-1,-1,-1, -1,-1,-1,-1, 8104,8105,8106,8107, 8108,8109,8110,8111, -1,-1,-1,-1, -1,-1,-1,-1, 8120,8121,-1,8124, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,921,-1, -1,-1,-1,8140, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8152,8153,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8168,8169,-1,-1, -1,8172,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,8188, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_21: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 8544,8545,8546,8547, 8548,8549,8550,8551, 8552,8553,8554,8555, 8556,8557,8558,8559, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_24: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 9398,9399,9400,9401, 9402,9403,9404,9405, 9406,9407,9408,9409, 9410,9411,9412,9413, 9414,9415,9416,9417, 9418,9419,9420,9421, 9422,9423,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase_ff: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,65313,65314,65315, 65316,65317,65318,65319, 65320,65321,65322,65323, 65324,65325,65326,65327, 65328,65329,65330,65331, 65332,65333,65334,65335, 65336,65337,65338,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end titlecase: ARRAY[ARRAY[INTEGER]] is once Result := << titlecase_00,titlecase_01,titlecase_02,titlecase_03, titlecase_04,titlecase_05,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_1e,titlecase_1f, titlecase_06,titlecase_21,titlecase_06,titlecase_06, titlecase_24,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_06, titlecase_06,titlecase_06,titlecase_06,titlecase_ff >> end --integer used: 3328 end -- class UC_CTYPE_TITLECASE --- NEW FILE: uc_ctype_uppercase.e --- indexing description: "database for mapping to uppercase"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 10:12:31 $" revision: "$Revision: 1.1 $" note: "This file generated by a script from the Unicode % %database and beautified by hand and emacs"; class UC_CTYPE_UPPERCASE inherit UC_CONSTANTS end feature {UC_CTYPE} -- Uppercase conversion tables uppercase_00: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,65,66,67, 68,69,70,71, 72,73,74,75, 76,77,78,79, 80,81,82,83, 84,85,86,87, 88,89,90,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,924,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 192,193,194,195, 196,197,198,199, 200,201,202,203, 204,205,206,207, 208,209,210,211, 212,213,214,-1, 216,217,218,219, 220,221,222,376 >> end uppercase_01: ARRAY[INTEGER] is once Result := << -1,256,-1,258, -1,260,-1,262, -1,264,-1,266, -1,268,-1,270, -1,272,-1,274, -1,276,-1,278, -1,280,-1,282, -1,284,-1,286, -1,288,-1,290, -1,292,-1,294, -1,296,-1,298, -1,300,-1,302, -1,73,-1,306, -1,308,-1,310, -1,-1,313,-1, 315,-1,317,-1, 319,-1,321,-1, 323,-1,325,-1, 327,-1,-1,330, -1,332,-1,334, -1,336,-1,338, -1,340,-1,342, -1,344,-1,346, -1,348,-1,350, -1,352,-1,354, -1,356,-1,358, -1,360,-1,362, -1,364,-1,366, -1,368,-1,370, -1,372,-1,374, -1,-1,377,-1, 379,-1,381,83, -1,-1,-1,386, -1,388,-1,-1, 391,-1,-1,-1, 395,-1,-1,-1, -1,-1,401,-1, -1,502,-1,-1, -1,408,-1,-1, -1,-1,-1,-1, -1,416,-1,418, -1,420,-1,-1, 423,-1,-1,-1, -1,428,-1,-1, 431,-1,-1,-1, 435,-1,437,-1, -1,440,-1,-1, -1,444,-1,503, -1,-1,-1,-1, -1,452,452,-1, 455,455,-1,458, 458,-1,461,-1, 463,-1,465,-1, 467,-1,469,-1, 471,-1,473,-1, 475,398,-1,478, -1,480,-1,482, -1,484,-1,486, -1,488,-1,490, -1,492,-1,494, -1,-1,497,497, -1,500,-1,-1, -1,504,-1,506, -1,508,-1,510 >> end uppercase_02: ARRAY[INTEGER] is once Result := << -1,512,-1,514, -1,516,-1,518, -1,520,-1,522, -1,524,-1,526, -1,528,-1,530, -1,532,-1,534, -1,536,-1,538, -1,540,-1,542, -1,-1,-1,546, -1,548,-1,550, -1,552,-1,554, -1,556,-1,558, -1,560,-1,562, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,385, 390,-1,393,394, -1,399,-1,400, -1,-1,-1,-1, 403,-1,-1,404, -1,-1,-1,-1, 407,406,-1,-1, -1,-1,-1,412, -1,-1,413,-1, -1,415,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 422,-1,-1,425, -1,-1,-1,-1, 430,-1,433,434, -1,-1,-1,-1, -1,-1,439,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end uppercase_03: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,921,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 902,904,905,906, -1,913,914,915, 916,917,918,919, 920,921,922,923, 924,925,926,927, 928,929,931,931, 932,933,934,935, 936,937,938,939, 908,910,911,-1, 914,920,-1,-1, -1,934,928,-1, -1,-1,-1,986, -1,988,-1,990, -1,992,-1,994, -1,996,-1,998, -1,1000,-1,1002, -1,1004,-1,1006, 922,929,931,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1 >> end uppercase_04: ARRAY[INTEGER] is once Result := << -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, 1040,1041,1042,1043, 1044,1045,1046,1047, 1048,1049,1050,1051, 1052,1053,1054,1055, 1056,1057,1058,1059, 1060,1061,1062,1063, 1064,1065,1066,1067, 1068,1069,1070,1071, 1024,1025,1026,1027, 1028,1029,1030,1031, 1032,1033,1034,1035, 1036,1037,1038,1039, -1,1120,-1,1122, -1,1124,-1,1126, -1,1128,-1,1130, -1,1132,-1,1134, -1,1136,-1,1138, -1,1140,-1,1142, -1,1144,-1,1146, -1,1148,-1,1150, -1,1152,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,1164,-1,1166, -1,1168,-1,1170, -1,1172,-1,1174, -1,1176,-1,1178, -1,1180,-1,1182, -1,1184,-1,1186, -1,1188,-1,1190, -1,1192,-1,1194, -1,1196,-1,1198, -1,1200,-1,1202, -1,1204,-1,1206, -1,1208,-1,1210, -1,1212,-1,1214, -1,-1,1217,-1, 1219,-1,-1,-1, 1223,-1,-1,-1, 1227,-1,-1,-1, -1,1232,-1,1234, -1,1236,-1,1238, -1,1240,-1,1242, -1,1244,-1,1246, -1,1248,-1,1250, -1,1252,-1,1254, -1,1256,-1,1258, -1,1260,-1,1262, -1,1264,-1,1266, -1,1268,-1,-1, -1,1272,-1,-1, -... [truncated message content] |
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv10958 Added Files: uc_representation.e uc_representation_factory.e uc_representation_types.e uc_representation_utf32.e uc_representation_utf8.e Log Message: added representations --- NEW FILE: uc_representation.e --- indexing description: "abstract string representation"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 07:45:20 $" revision: "$Revision: 1.1 $" deferred class UC_REPRESENTATION feature type: INTEGER -- type of this representation feature count: INTEGER -- number of ucchars valid_index (pos: INTEGER): BOOLEAN is -- is `pos' a valid index into ucstring? do Result := (1 <= pos) and then (pos <= count) end valid_code (code: INTEGER): BOOLEAN is -- is `code' a valid unicode code? require non_negative: 0 <= code; local ucc: UC_CHARACTER do Result := ucc.valid_code(code) end item_code (i: INTEGER): INTEGER is -- code of item at position `i' require good_key: valid_index(i) deferred end put_code (c: INTEGER; i: INTEGER) is -- put code `c' at index `i' require good_key: valid_index(i); -- valid_code deferred end remove (start, c: INTEGER) is -- remove `c' characters from representation, starting at -- index `start'. require valid_index: valid_index(start); non_negative_count: c >= 0; vali_index_of_last: valid_index(start+c-1); deferred ensure count = (old count) - c; end insert_code (code, idx: INTEGER) is -- insert character with `code' at position `idx'. if you -- want to append the code, use `idx' = `count' + 1. require valid_idx: valid_index(idx) or else idx = count + 1; valid code: valid_ocde(code); deferred ensure count = (old count) + 1 end insert (idx: INTEGER; other: UC_REPRESENTATION; ostart, ocount: INTEGER) is -- insert, starting at position `idx', characters from the -- representation given in `other'. the slice starts at -- `ostart' in `other' and has `ocount' characters. if you -- want to append the code, use `idx' = `count' + 1. require valid_idx: valid_index(idx) or else idx = count + 1; non_negative_count_of_other: ocount >= 0; other_not_void: other /= void; valid_start_index_of_other: other.valid_index(ostart); valid_end_index_of_other: other.valid_index(ostart+ocount-1); local i: INTEGER do --! could be optimized in subclasses from i := 1 until i > ocount loop insert_code(other.item_code(ostart+i-1), idx+i-1) i := i + 1 end ensure count = (old count) + ocount; end end -- class UC_REPRESENTATION --- NEW FILE: uc_representation_factory.e --- indexing description: "representation factory"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 07:45:20 $" revision: "$Revision: 1.1 $" class UC_REPRESENTATION_FACTORY inherit UC_REPRESENTATION_TYPES end creation make feature {NONE} -- Creation make is do set_default_representation(Representation_UTF8) end feature set_default_representation (t: INTEGER) is -- set default representation to `t' require -- valid representation type do type := t end create_representation: UC_REPRESENTATION is -- create new representation from default type do inspect type when Representation_UTF8 then !UC_REPRESENTATION_UTF8!Result.make when Representation_UTF32 then !UC_REPRESENTATION_UTF32!Result.make end end type: INTEGER -- current representation type end -- class UC_REPRESENTATION_FACTORY --- NEW FILE: uc_representation_types.e --- indexing description: "representation types"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 07:45:20 $" revision: "$Revision: 1.1 $" class UC_REPRESENTATION_TYPES feature -- types Representation_UTF8: INTEGER is 1 -- representation as UTF8-String Representation_UTF32: INTEGER is 2 -- representation as 32bit integer array end -- class UC_REPRESENTATION_TYPES --- NEW FILE: uc_representation_utf32.e --- indexing description: "string representation as array of integer codes"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 07:45:20 $" revision: "$Revision: 1.1 $" class UC_REPRESENTATION_UTF32 inherit UC_REPRESENTATION end creation make feature {NONE} -- Creation make is do !!storage.make(1,0) end feature -- Inherited from UC_REPRESENTATION item_code (i: INTEGER): INTEGER is do Result := storage.item(i) end put_code (c: INTEGER; i: INTEGER) is do storage.put(c, i) end remove (start, c: INTEGER) is do if c > 0 then move(start+c, start, count - start -c + 1) set_count(count-c) end end insert_code (code, idx: INTEGER) is local cnt: INTEGER do if idx = count + 1 then -- append storage_ensure_capacity(count + 1) set_count(count + 1) put_code(code, count) else cnt := count - idx + 1 storage_ensure_capacity(count + 1) move(idx, idx + 1, cnt) set_count(count + 1) put_code(code, idx) end end feature {NONE} set_count (c: INTEGER) is do count := c end feature {NONE} -- managing storage storage: ARRAY[INTEGER] -- string's storage move (src_offset, target_offset, ct: INTEGER) is -- move `ct' characters from `src_offset' to `target_offset' local i: INTEGER do if src_offset < target_offset then -- move right from i := ct-1 until i < 0 loop storage.put(storage.item(src_offset+i), target_offset+i) i := i - 1 end elseif src_offset > target_offset then -- move left from i := 0 until i >= ct loop storage.put(storage.item(src_offset+i), target_offset+i) i := i + 1 end end end storage_ensure_capacity (cap: INTEGER) is do if cap > storage.count then storage.resize(1,cap) end end end -- class UC_REPRESENTATION_UTF32 --- NEW FILE: uc_representation_utf8.e --- indexing description: "string representation as UTF8 string"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/15 07:45:20 $" revision: "$Revision: 1.1 $" class UC_REPRESENTATION_UTF8 inherit UC_REPRESENTATION redefine insert end creation make feature {NONE} -- Creation make is do !!storage.make(0) storage_count := 0 last_index := 0 end feature -- Inherited from UC_REPRESENTATION item_code (i: INTEGER): INTEGER is do Result := -1 find_position(i) utils.read_code(storage, storage_slice_start) Result := utils.last_code ensure then valid_utf8 end put_code (c: INTEGER; i: INTEGER) is local diff: INTEGER octets_needed, octets_given: INTEGER octets_to_be_moved: INTEGER do find_position(i) octets_given := 1 + utils.nr_of_following_octets(storage.item(storage_slice_start)) octets_needed := utils.octet_size(c) diff := octets_needed - octets_given octets_to_be_moved := storage_count - storage_slice_end -- make place if necessary if diff > 0 then -- insert place for some octets add_to_storage_count(diff) storage_move(storage_slice_start, storage_slice_start + diff, octets_to_be_moved) invalidate_optimized_access elseif diff < 0 then -- remove some octets storage_move(storage_slice_start-diff, storage_slice_start, octets_to_be_moved) add_to_storage_count(diff) invalidate_optimized_access end -- now set the octets utils.put_code(c, storage, storage_slice_start) ensure then valid_utf8 end remove (start, c: INTEGER) is do if last_index >= start then invalidate_optimized_access end if c > 0 then find_slice_position(start, start+c-1) if storage_count - storage_slice_end > 0 then storage_move(storage_slice_end+1, storage_slice_start, storage_count-storage_slice_end) end add_to_storage_count(-storage_slice_count) set_count(count-c) end ensure then valid_utf8 end insert_code (code, idx: INTEGER) is local o_size, cnt: INTEGER pos: INTEGER do if last_index >= idx then invalidate_optimized_access end if idx = count + 1 then -- append the code o_size := utils.octet_size(code) pos := storage_count add_to_storage_count(o_size) set_count(count + 1) utils.put_code(code, storage, pos + 1) else -- really insert find_position(idx) cnt := storage_count - storage_slice_start + 1 o_size := utils.octet_size(code) add_to_storage_count(o_size) storage_move(storage_slice_start, storage_slice_start + o_size, cnt) set_count(count + 1) utils.put_code(code, storage, storage_slice_start) end ensure then -- valid_utf8 end insert (idx: INTEGER; other: UC_REPRESENTATION; ostart, ocount: INTEGER) is local i: INTEGER octets_required: INTEGER code,pos: INTEGER cnt: INTEGER do if last_index >= idx then invalidate_optimized_access end if ocount > 0 then if idx = count + 1 then -- we append, no precalculation required from i := 1 until i > ocount loop insert_code(other.item_code(ostart+i-1), idx+i-1) i := i + 1 end else -- find out how many octets are required. from i := 1 until i > ocount loop code := other.item_code(ostart+i-1) octets_required := octets_required + utils.octet_size(code) i := i + 1 end find_position(idx) cnt := storage_count - storage_slice_start + 1 -- make place add_to_storage_count(octets_required) storage_move(storage_slice_start, storage_slice_start+octets_required,cnt) -- insert contents from i := 1 pos := storage_slice_start until i > ocount loop code := other.item_code(ostart+i-1) utils.put_code(code, storage, pos) pos := pos + utils.octet_size(code) i := i + 1 end -- adjust size set_count(count + ocount) end end ensure then valid_utf8 end feature {NONE} -- managing storage storage: STRING -- string's storage storage_move (src_offset, target_offset, ct: INTEGER) is -- move `ct' characters from `src_offset' to `target_offset' require valid_storage_index(src_offset); valid_storage_index(src_offset+ct-1); valid_storage_index(target_offset); valid_storage_index(target_offset+ct-1); local i: INTEGER do if src_offset < target_offset then -- move right from i := ct-1 until i < 0 loop storage.put(storage.item(src_offset+i), target_offset+i) i := i - 1 end elseif src_offset > target_offset then -- move left from i := 0 until i >= ct loop storage.put(storage.item(src_offset+i), target_offset+i) i := i + 1 end end end valid_storage_index (i: INTEGER): BOOLEAN is -- is `i' a valid index into `storage'? do Result := (1 <= i) and then (i <= storage_count) end storage_count: INTEGER -- last used position in `storage'. add_to_storage_count (o: INTEGER) is -- shrink or enlarge storage by `o' octets. require non_negative: o >= 0; do if o > 0 then if storage_count + o > storage.count then storage.resize(storage_count + o) end end storage_count := storage_count + o ensure storage_count = (old storage_count) + o end feature {NONE} -- mapping to storage indices optimize_access: BOOLEAN is -- is faster access for iterative access enabled? once Result := true end last_index: INTEGER -- last position of access with `item_code'. will be `0` if -- the position is dirty last_storage_slice_start: INTEGER -- corresponding position in `storage' invalidate_optimized_access is -- mark optimizing information as invalid. do last_index := 0 end find_position (idx: INTEGER) is -- map index `idx' to position in `storage'. make result -- available in `storage_slice_start'. require valid_index(idx); local i: INTEGER pos: INTEGER f_octets: INTEGER opt_success: BOOLEAN do if optimize_access and then last_index /= 0 then if last_index = idx - 1 then -- we want to access the next item f_octets := utils.nr_of_following_octets(storage.item(last_storage_slice_start)) pos := last_storage_slice_start + f_octets + 1 opt_success := true elseif last_index = idx + 1 then -- we want to access the previous item from pos := last_storage_slice_start - 1 until utils.is_leading_octet(storage.item(pos)) loop pos := pos - 1 end opt_success := true end end if not opt_success then from i := 1 pos := 1 until i >= idx loop pos := pos + utils.nr_of_following_octets(storage.item(pos)) + 1 i := i + 1 end end last_index := idx storage_slice_start := pos last_storage_slice_start := pos end find_slice_position (start, p_end: INTEGER) is -- map string indices to storage indices. the slice to be -- mapped starts at `start' and ends at `p_end'. the resulting -- storage indices are stored in `storage_slice_start' and -- `storage_slice_end'. require valid_index(start); valid_index(p_end); start <= p_end; local i: INTEGER pos: INTEGER do find_position(start) -- find last position from i := start pos := storage_slice_start until i > p_end loop pos := pos + utils.nr_of_following_octets(storage.item(pos)) + 1 i := i + 1 end storage_slice_end := pos - 1 end storage_slice_start: INTEGER -- storage index start. set by `map_to_storage_position' storage_slice_end: INTEGER -- storage index end. set by `map_to_storage_position' storage_slice_count: INTEGER is -- number of storage octets in mapped storage slice require valid_storage_index(storage_slice_start); valid_storage_index(storage_slice_end); storage_slice_start <= storage_slice_end; do Result := storage_slice_end - storage_slice_start + 1 ensure positive: Result > 0; end feature {NONE} set_count (i: INTEGER) is -- set `count' to `i' require non_negative: i >= 0 do count := i ensure count = i end feature -- UTF8 Validation valid_utf8: BOOLEAN is -- is the utf8-representation an valid one? do if storage_count > 0 then Result := utils.valid_utf8(storage, 1, storage_count) else Result := true end end feature {NONE} utils: UC_UTF8_UTILS is -- utf8 utilities once !!Result end end -- class UC_REPRESENTATION_UTF8 |
From: majkel k. <maj...@us...> - 2001-06-13 12:07:34
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv20935 Added Files: uc_character.e uc_character_ref.e Log Message: added uc_character and uc_character_ref --- NEW FILE: uc_character.e --- indexing description: "An unicode character"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/13 12:07:28 $" revision: "$Revision: 1.1 $" expanded class UC_CHARACTER inherit UC_CHARACTER_REF end feature -- To make ISE Eiffel happy end -- class UC_CHARACTER --- NEW FILE: uc_character_ref.e --- indexing description: "Reference class for UC_CHARACTER"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/13 12:07:28 $" revision: "$Revision: 1.1 $" class UC_CHARACTER_REF inherit HASHABLE redefine out, is_equal end COMPARABLE redefine out, is_equal end UC_CONSTANTS redefine out, is_equal end creation make_from_integer, make_from_character feature make_from_integer (i: INTEGER) is -- Initialize from code `i' require valid_code: valid_code(i); do set_code(i) end make_from_character (c: CHARACTER) is -- create new ucchar from `c' do set_code(c.code) end feature -- Access item : UC_CHARACTER is -- `UC_CHARACTER' value do !!Result Result.set_code(code) end code: INTEGER is -- Associated integer value do Result := i_code ensure valid_code: valid_code(i_code); end hash_code : INTEGER is do Result := code + 1 end feature -- Comparison infix "<" (other : like Current) : BOOLEAN is -- Is current ucchar less than `other' ? do Result := code < other.code end is_equal (other: like Current): BOOLEAN is do Result := Current = other or else code = other.code end feature -- Element change set_item (c : UC_CHARACTER) is -- Make `c' the associated character value do i_code := c.code ensure item_set: item.is_equal(c); end set_code (c: INTEGER) is require valid_code: valid_code(c); do i_code := c end feature -- Output out: STRING is do !!Result.make(0) if code < 256 then Result.append_character(code_to_character(code)) else Result.append_string("\u") Result.append_string(hex_representation(code)) Result.append_character(';') end end to_upper is -- convert to upper case do set_item(ctype.to_upper(item)) end to_lower is -- convert to lower case do set_item(ctype.to_lower(item)) end to_title is -- convert to title case do set_item(ctype.to_title(item)) end general_category: INTEGER is -- the unicode general category of `current' do Result := ctype.general_category(item) end feature -- valid_code (i: INTEGER): BOOLEAN is -- is `i' valid unicode-code? do Result := 0 <= i and i <= maximum_uc_character_code ensure Result = (0 <= i and i <= maximum_uc_character_code) end maximum_uc_character_code: INTEGER is -- maximal uc_character code once Result := 2_147_483_647 end feature {UCCHAR_REF} -- Implementation i_code: INTEGER hex_representation (c: INTEGER): STRING is -- convert `c' into 4-digit hexadecimal string local cc, i: INTEGER do !!Result.make_from_string("1234") from i := 4 cc := c until i < 1 loop Result.put(hex_digit_string.item(cc\\16+1), i) cc := cc // 16; i := i - 1 end end hex_digit_string: STRING is once !!Result.make_from_string("0123456789abcdef") end ctype: UC_CTYPE is -- the unicode database, character types once !!Result end code_to_character (i: INTEGER): CHARACTER is -- convert code position `i' to `CHARACTER' do Result := specific.code_to_character(i) end specific: KL_INTEGER_ROUTINES is -- specific routines are now provided by GOBO. once !!Result end feature -- new features -- categories is_other: BOOLEAN is -- is this character an other? (category gc_other_*) do inspect ctype.general_category(item) when gc_other_control, gc_other_format, gc_other_surrogate, gc_other_private_use, gc_other_not_assigned then Result := true else Result := false end end is_punctuation: BOOLEAN is -- is character a punctuation? (Category gc_punctuation_*) do inspect ctype.general_category(item) when gc_punctuation_connector, gc_punctuation_dash, gc_punctuation_open, gc_punctuation_close, gc_punctuation_initial_quote, gc_punctuation_final_quote, gc_punctuation_other then Result := true else Result := false end end is_symbol: BOOLEAN is -- is character a symbol? (Category gc_symbol_*) do inspect ctype.general_category(item) when gc_symbol_math, gc_symbol_currency, gc_symbol_modifier, gc_symbol_other then Result := true else Result := false end end is_separator: BOOLEAN is -- is the character a sparator character? (Category -- gc_separator_*) do inspect ctype.general_category(item) when gc_separator_space, gc_separator_line, gc_separator_paragraph then Result := true else Result := false end end is_mark: BOOLEAN is -- is this character a mark ? (Category gc_mark_*) do inspect ctype.general_category(item) when gc_mark_nonspacing, gc_mark_space_combining, gc_mark_enclosing then Result := true else Result := false end end is_letter: BOOLEAN is -- is this character a letter? (Category gc_letter_*) do inspect ctype.general_category(item) when gc_letter_uppercase, gc_letter_lowercase, gc_letter_titlecase, gc_letter_modifier, gc_letter_other then Result := true else Result := false end end is_number: BOOLEAN is -- is this character a number (Category gc_number_*) do inspect ctype.general_category(item) when gc_number_decimal_digit, gc_number_letter, gc_number_other then Result := true else Result := false end end -- digit_value: INTEGER -- returns the numeric value of the digit -- require: is a digit -- is_mirrored: BOOLEAN -- is this character a mirrored character? (one that should -- be reversed if the text direction is reversed) end -- class UC_CHARACTER_REF |
From: majkel k. <maj...@us...> - 2001-06-12 13:55:38
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv32166 Added Files: uc_utf8_utils.e Log Message: replaceing compiler dependent operations of UC_SPECIFIC by GOBO --- NEW FILE: uc_utf8_utils.e --- indexing description: "utilities for dealing with UTF8"; library: "Gobo Eiffel Unicode Library" author: "michael kretschmar <maj...@ep...>" copyright: "Copyright (c) 2001, michael kretschmar and others" license: "Eiffel Forum Freeware License v1 (see forum.txt)" date: "$Date: 2001/06/12 13:55:33 $" revision: "$Revision: 1.1 $" class UC_UTF8_UTILS feature is_leading_octet (octet: CHARACTER): BOOLEAN is -- is `octet' a leading octet? local code: INTEGER do code := octet.code -- all but 10xx.xxxx Result := (0 <= code and code < 128) or else (192 <= code) end is_following_octet (octet: CHARACTER): BOOLEAN is -- is `octet' a following octet? local code: INTEGER do code := octet.code -- 10xx.xxxx Result := (128 <= code) and (code < 192) end nr_of_following_octets (octet: CHARACTER): INTEGER is -- number of following octets to given `octet' require is_leading_octet: is_leading_octet(octet) local code: INTEGER do code := octet.code if (code < 128) then -- 0xxx.xxxx Result := 0 elseif (code >= 192) then if (code <= 223) then -- 110x.xxxx Result := 1 elseif (code <= 239) then -- 1110.xxxx Result := 2 elseif (code <= 247) then -- 1111.0xxx Result := 3 elseif (code <= 251) then -- 1111.10xx Result := 4 elseif (code <= 253) then -- 1111.110x Result := 5 end end ensure not_negative: Result >= 0 end feature octet_size (code: INTEGER): INTEGER is -- how many octets are required for representing `code'? require is_valid_code: valid_code(code); do if code < 128 then -- 0x0000.0000-0x0000.007f Result := 1 elseif code < 2048 then -- 0x0000.0080-0x0000.07ff Result := 2 elseif code < 65536 then -- 0x0000.0800-0x0000.ffff Result := 3 elseif code < 2097152 then -- 0x0001.0000-0x001f.ffff Result := 4 elseif code < 67108864 then -- 0x0020.0000-0x03ff.ffff Result := 5 else -- 0x0400.0000-0x7fff.ffff Result := 6 end end feature put_code (code: INTEGER; buffer: STRING; pos: INTEGER) is -- put unicode `code' to `buffer' beginning at position -- `pos'. the resulting octets will be written to given -- position; if there is no more space left in buffer, it -- will be resized. require valid_code(code); buffer_not_void: buffer /= void; non_negative_position: pos >= 0; valid_buffer_index: pos > 1 implies buffer.valid_index(pos-1); local size, c, v, i: INTEGER do -- enlarge buffer if necessary size := octet_size(code) if not buffer.valid_index(pos+size-1) then --! this could be better programmed ... from i := 1 until i > size loop if not buffer.valid_index(pos+i-1) then buffer.append_character(' ') end i := i + 1 end end -- writing following bytes from c := code until size <= 1 loop v := (c \\ 64) + 128 buffer.put(code_to_character(v), pos+size-1) c := c // 64 size := size - 1 end -- write leading byte v := c inspect octet_size(code) when 1 then v := v + 0 when 2 then v := v + 192 when 3 then v := v + 224 when 4 then v := v + 240 when 5 then v := v + 248 when 6 then v := v + 252 end buffer.put(code_to_character(v), pos) end last_code: INTEGER -- last code read by `read_code' next_pos: INTEGER -- next position read_code (buffer: STRING; pos: INTEGER) is -- read next unicode from `buffer', starting at position -- `pos'. make the result available in `last_code'. The -- position immediately following this code is stored in -- `next_pos'. require buffer_not_void: buffer /= void; valid_buffer_index: buffer.valid_index(pos); first_is_leading_octet: is_leading_octet(buffer.item(pos)); valid_buffer_index_of_last_octet: buffer.valid_index(pos+nr_of_following_octets(buffer.item(pos))); local cnt: INTEGER do cnt := read_leading_octet(buffer, pos) -- get following octets from until cnt <= 0 loop read_following_octet(buffer) cnt := cnt - 1 end end feature {NONE} -- Supporting read_code read_leading_octet (buffer: STRING; pos: INTEGER): INTEGER is -- read leading octet from `buffer'. return the number of -- following octets. the contained code is stored in -- `last_code'. require buffer_not_void: buffer /= void; valid_index: buffer.valid_index(pos); is_leading_octet: is_leading_octet(buffer.item(pos)); local code: INTEGER xcp: EXCEPTIONS do Result := -2 last_code := 0 code := buffer.item(pos).code if (code < 128) then -- 0xxx.xxxx last_code := code Result := 0 elseif (code >= 192) then if (code <= 223) then -- 110x.xxxx last_code := code \\ 32 Result := 1 elseif (code <= 239) then -- 1110.xxxx last_code := code \\ 16 Result := 2 elseif (code <= 247) then -- 1111.0xxx last_code := code \\ 8 Result := 3 elseif (code <= 251) then -- 1111.10xx last_code := code \\ 4 Result := 4 elseif (code <= 253) then -- 1111.110x last_code := code \\ 2 Result := 5 end end if Result = -2 then !!xcp xcp.raise("Malformed UTF8 " + code.out) else next_pos := pos + 1 end end read_following_octet (buffer: STRING) is -- read following octet and update `last_code'. require buffer_not_void: buffer /= void; valid_index: buffer.valid_index(next_pos); is_following_octet: is_following_octet(buffer.item(next_pos)); local xcp: EXCEPTIONS code: INTEGER do code := buffer.item(next_pos).code if (code >= 128) and (code <= 191) then last_code := last_code * 64 + code \\ 64 else !!xcp xcp.raise("Malformed UTF8") end next_pos := next_pos + 1 end feature valid_utf8 (buffer: STRING; start, cnt: INTEGER): BOOLEAN is -- is the utf8-representation in `buffer', starting at `start' -- and having a length of `cnt', an valid one? require buffer_not_void: buffer /= void; valid_index: buffer.empty or else buffer.valid_index(start); valid_cnt: cnt >= 0; valid_cnt_1: cnt > 0 implies buffer.valid_index(start+cnt-1); local i,j: INTEGER octet: CHARACTER do from Result := true i := 1 until not Result or else i > cnt loop octet := buffer.item(start+i-1) if is_leading_octet(octet) then i := i + 1 from j := nr_of_following_octets(octet) until not Result or else j <= 0 loop if i > start+cnt-1 then -- out of range Result := false else octet := buffer.item(start+i-1) if is_following_octet(octet) then i := i + 1 else -- invalid following octet Result := false end end j := j - 1 end else -- invalid leading octet Result := false end end end valid_code (code: INTEGER): BOOLEAN is -- is `code' a valid one? local ucc: UC_CHARACTER do Result := ucc.valid_code(code) end feature {NONE} -- Compiler specific methods code_to_character (i: INTEGER): CHARACTER is -- convert code position `i' to `CHARACTER' do Result := specific.to_character(i) end specific: KL_INTEGER_ROUTINES is -- specific routines are now provided by GOBO. once !!Result end end -- class UC_UTF8_UTILS |
From: majkel k. <maj...@us...> - 2001-06-12 13:34:03
|
Update of /cvsroot/gobo-eiffel/gobo/library/kernel/unicode In directory usw-pr-cvs1:/tmp/cvs-serv26122/unicode Log Message: Directory /cvsroot/gobo-eiffel/gobo/library/kernel/unicode added to the repository |