Refactor the generator scripts for unicode tables (#1623)

Extract the source code generator methods into a separated `unicode_c_source.py` script.
Fix the generator scripts to make them compatible with both Python2 and Python3.
Remove pylint warnings.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2017-03-16 09:32:18 +01:00
committed by László Langó
parent 818c9cd0b0
commit d77d4ae1c6
5 changed files with 654 additions and 746 deletions
+4 -4
View File
@@ -11,10 +11,11 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is automatically generated by the unicode_case_conversion.py script. Do not edit!
*/
/* This file is automatically generated by the unicode_case_conversion.py script
* from UnicodeData-9.0.0.txt and SpecialCasing-9.0.0.txt files. Do not edit! */
/* Contains start points of character case ranges (these are bidirectional conversions). */
static const uint16_t jerry_character_case_ranges[] JERRY_CONST_DATA =
{
@@ -154,9 +155,8 @@ static const uint16_t jerry_upper_case_conversions[] JERRY_CONST_DATA =
0x0046, 0x004c
};
/* Number of one-to-one, one-to-two, and one-to-three lowercase conversions. */
/* Number of one-to-one, one-to-two, and one-to-three uppercase conversions. */
static const uint8_t jerry_upper_case_conversion_counters[] JERRY_CONST_DATA =
{
0x001c, 0x002c, 0x0010
};
+3 -4
View File
@@ -11,11 +11,11 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is automatically generated by the unicode_ranges.py script
* from UnicodeData-3.0.0.txt. Do not edit!
*/
/* This file is automatically generated by the unicode_ranges.py script
* from UnicodeData-3.0.0.txt. Do not edit! */
/**
* Character interval starting points for the unicode letters.
*
@@ -180,4 +180,3 @@ static const uint16_t jerry_unicode_separator_chars[] JERRY_CONST_DATA =
{
0x1680, 0x180e, 0x202f, 0x205f, 0x3000
};