Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 21st, 2006, 08:49 AM
awachtel awachtel is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: Atlanta
Posts: 5 awachtel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 19 sec
Reputation Power: 0
Question Custom scripting language development

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.

Reply With Quote
  #2  
Old June 21st, 2006, 02:51 PM
awachtel awachtel is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: Atlanta
Posts: 5 awachtel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 19 sec
Reputation Power: 0
bump..

Reply With Quote
  #3  
Old June 21st, 2006, 05:09 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 30 m 22 sec
Reputation Power: 2509
--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.

Reply With Quote
  #4  
Old June 22nd, 2006, 07:31 AM
awachtel awachtel is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: Atlanta
Posts: 5 awachtel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 57 m 19 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
--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.

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!

Reply With Quote
  #5  
Old June 22nd, 2006, 07:37 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information
 
Join Date: Sep 2004
Location: Israel
Posts: 29,260 Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2Folding Points: 587027 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 2 Days 30 m 22 sec
Reputation Power: 2509
ok, I'll search for that assignment, remind me within one day if I don't come back.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Custom scripting language development


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek