write a parser that would extract & replace all specified string literals in a vb6 project. bidder please describe your experience with parsing tools such as regular expression, lex, yacc.
Details:
our goal is to build a localization tool that would extract all specified string literals into a file, replace them with a placeholder and load them back in at runtime. this way, a translator can take the extracted strings file, localize it and pass it back to the development team without having to touch the source code.
your task is to write the string replacement and extraction utility that
1) replace all string literals as specified below with a call to the GetString function used to extract a string from the localization text file given a placeholder tag at runtime:
1) all string constants in the code
2) all text and caption properties of controls/forms
we've already implemented the GetString function.
12/1****
i've added a PDF file in the attachment to offer some additional explanations of the project. the filename is explanation.pdf. please kindly take a look.
## Deliverables
example 1:
Private Sub Command1_Click()
Select Case Text1
Case "1"
MsgBox "one"
Case "2"
MsgBox "two"
End Select
End Sub
Becomes....
Private Sub Command1_Click()
Select Case Text1
Case GetString("HELLOWORLD_1") ' returns "1"
MsgBox GetString("HELLOWORLD_2") ' returns "one"
Case GetString("HELLOWORLD_3") ' returns "2"
MsgBox GetString("HELLOWORLD_4") ' returns "two"
End Select
End Sub
the placeholder tag follows the following format: each time when you encounter a string, replace it with HELLOWORLD_n where n is a counter denoting the number of strings you have replaced so far in the whole vb6 project.
example2 (see attachment)
the input project is in the "original" directory. the output is in "new" directory which contains the translated project plus the extracted string file [login to view URL]
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
windows