|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm in the middle of developing some new reporting functionality inside of one of my current applications. To accompany it, I've devised a high level scripting language to give me and my users a little more control on the output...
The functions are: CONCAT (Concatenation of strings) TRUNC (Truncation of strings) WRITE (Write a literal or recordset value) CAST (Cast a value(1) to a string representation('Employee')) A simple example to concatenate a first name and a last name into a single string would be: CONCAT(WRITE(EmployeeFirstName:1):WRITE(EmployeeLa stName:1)) This consists of 2 different functions: CONCAT(Arg1:Arg2:Arg3:ArgN...) and WRITE(String,ResultsetID) (This reporting format will be taken in via CSV, hence why I'm using :'s instead of commas to separate arguments. This seems logical to me but what is a good way to pursue effectively parsing said line of code?? I've tried breaking it apart several different ways but cant seem to get consistent results. TIA. |
|
#2
|
|||
|
|||
|
bump..
|
|
#3
|
||||
|
||||
|
--moved to the Programming Help Forum, as this has nothing to do with ASP
what do you mean by "pursue effectively parsing said line of code"? if you can explain bit more what you're after it would help us understand and help you... in general you should use Stack of some kind and parse the command line according to the brackets. I have one of my first C++ assignments (or was it Java?) where we had to build "math parser" - console application that got such input: 3*(6-9/(76+110)) and show the result - its basic logic is quite similar to your case if you want I can search for the code and put it here. |
|
#4
|
|||
|
|||
|
Quote:
Yep, that's essentially all I need, just an effective way to parse and return a result. BTW, I put it in the ASP forum as it needs to be parsed using ASP. Thx for the help! |
|
#5
|
||||
|
||||
|
ok, I'll search for that assignment, remind me within one day if I don't come back.
![]() |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Custom scripting language development |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|