Ignore:
Timestamp:
Feb 13, 2011, 6:15:21 PM (9 years ago)
Author:
ksherdy
Message:

Modularize charset compiler and character set definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/charset_input_parser.py

    r854 r915  
    55# of the form 'character class name = []' and produces (character class name, character class item list).
    66#
     7import charset_def
    78
    89debug = False
     
    126127            return ()
    127128
    128 
    129129def processCharsetInput(input_filename):
    130130        """
     
    165165                report_CharSetDef(charset_declaration_list)
    166166        return charset_declaration_list
     167
     168def input_chardef(filename):
     169    """
     170    Returns a list of declared CharSet from the declarations in the input file
     171    """
     172    defs = []
     173    charset_declaration_list = processCharsetInput(filename)
     174   
     175    for charset_declaration in charset_declaration_list:
     176        defs.append(charset_def.CharSetDef (charset_declaration[0], charset_declaration[1]))
     177
     178    return defs
     179
Note: See TracChangeset for help on using the changeset viewer.