* Expression Parser @ 1999-07-27 0:00 Ehud Lamm 1999-07-28 0:00 ` Jeffrey D. Cherry ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Ehud Lamm @ 1999-07-27 0:00 UTC (permalink / raw) Does anyone know of simple embeddable exprssion parser that I can reuse? Ideally should support numeric as well as string data, and if constructs. Thanks. Ehud Lamm mslamm@pluto.mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-27 0:00 Expression Parser Ehud Lamm @ 1999-07-28 0:00 ` Jeffrey D. Cherry 1999-07-29 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Brian Rogoff 1999-07-29 0:00 ` Gautier 2 siblings, 1 reply; 14+ messages in thread From: Jeffrey D. Cherry @ 1999-07-28 0:00 UTC (permalink / raw) Although it's not a parser, a good place to start would be the OpenToken page: http://www.telepath.com/dennison/Ted/OpenToken/OpenToken.html From the code and examples available at this site, you may find that with a little code of your own, it's all you really need. Hope this helps! -- Regards, Jeffrey D. Cherry Senior IV&V Analyst Logicon Space and Information Operations Logicon Inc. a Northrop Grumman company ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-28 0:00 ` Jeffrey D. Cherry @ 1999-07-29 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Martin C. Carlisle 1999-07-30 0:00 ` Ted Dennison 0 siblings, 2 replies; 14+ messages in thread From: Ehud Lamm @ 1999-07-29 0:00 UTC (permalink / raw) On Wed, 28 Jul 1999, Jeffrey D. Cherry wrote: |Although it's not a parser, a good place to start would be the OpenToken |page: | | http://www.telepath.com/dennison/Ted/OpenToken/OpenToken.html | Since it seems I'll have to hack something up myself, I'll give this a clsoe look. From what i've seen it seems very nice. I'll take this opportunity to share an observation. Ada is designed for reuse and for good SE practices. Since the latter discourage many would be Ada hackers, we end up with less code to reuse. Of course bad code shouldn't be reused, but the more code out there the greater the chance some of it will be good. I checked out a site dedicated to Lego_Mindstorms (http://www.crynwr.com/lego-robotics/) and didn't see any Ada interface. If someone is interested in this sort of thing, this seems like a fun project. Ehud Lamm mslamm@pluto.mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-29 0:00 ` Ehud Lamm @ 1999-07-29 0:00 ` Martin C. Carlisle 1999-07-31 0:00 ` David Botton 1999-07-30 0:00 ` Ted Dennison 1 sibling, 1 reply; 14+ messages in thread From: Martin C. Carlisle @ 1999-07-29 0:00 UTC (permalink / raw) In article <Pine.A41.3.96-heb-2.07.990729112145.104782E-100000@pluto.mscc.huji.ac.il>, Ehud Lamm <mslamm@mscc.huji.ac.il> wrote: >On Wed, 28 Jul 1999, Jeffrey D. Cherry wrote: >I checked out a site dedicated to Lego_Mindstorms >(http://www.crynwr.com/lego-robotics/) and didn't see any Ada interface. >If someone is interested in this sort of thing, this seems like a fun >project. We are exploring this possibility at the Air Force Academy. I am not the lead on this, but am giving some technical advice. --Martin -- Martin C. Carlisle, Asst Prof of Computer Science, US Air Force Academy carlislem@acm.org, http://www.usafa.af.mil/dfcs/bios/carlisle.html DISCLAIMER: This content in no way reflects the opinions, standards or policy of the US Air Force Academy or the United States Government. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-29 0:00 ` Martin C. Carlisle @ 1999-07-31 0:00 ` David Botton 1999-08-01 0:00 ` Ehud Lamm 0 siblings, 1 reply; 14+ messages in thread From: David Botton @ 1999-07-31 0:00 UTC (permalink / raw) I would like to point out that to my understanding there is a COM (aka ActiveX) interface available for the Lego_Mindstorms product. Therefore you can use it from Ada by just running BindCOM (http://www.adapower.com/com) on the COM object to produce a thick and thin Ada binding to it. Of course if any one wants to send me one, I'll test it for you :) David Botton Martin C. Carlisle wrote in message <7npml7$9iu$1@cnn.Princeton.EDU>... >In article <Pine.A41.3.96-heb-2.07.990729112145.104782E-100000@pluto.mscc.huji.ac.il>, >Ehud Lamm <mslamm@mscc.huji.ac.il> wrote: >>On Wed, 28 Jul 1999, Jeffrey D. Cherry wrote: >>I checked out a site dedicated to Lego_Mindstorms >>(http://www.crynwr.com/lego-robotics/) and didn't see any Ada interface. >>If someone is interested in this sort of thing, this seems like a fun >>project. > >We are exploring this possibility at the Air Force Academy. I am not the lead >on this, but am giving some technical advice. > >--Martin > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-31 0:00 ` David Botton @ 1999-08-01 0:00 ` Ehud Lamm 1999-08-03 0:00 ` David C. Hoos, Sr. 0 siblings, 1 reply; 14+ messages in thread From: Ehud Lamm @ 1999-08-01 0:00 UTC (permalink / raw) On Sat, 31 Jul 1999, David Botton wrote: |I would like to point out that to my understanding there is a COM (aka |ActiveX) interface available for the Lego_Mindstorms product. | |Therefore you can use it from Ada by just running BindCOM |(http://www.adapower.com/com) on the COM object to produce a thick and thin |Ada binding to it. Sounds real nice. But points to another thing. Notice how beginners have a hard time with Ada? How often do we hear questions like "I am starting with Ada, how do I..."? Having a good platform for starting out is crucial for language success (in the hobby market at least), recall Turbo Pascal, BASICA/QBASIC etc etc. GNAT is great, but packaging it with mroe examples etc. esp. with easier to understand Windows examples, and perhaps a GUI builder will help greatly. Supplying a standard library of data structures and algorithms, with examples of use will also be a step in the right direction. Another idea is evloving something like PERL's CPAN. The Source Code Treasury seems like a very good starting point. This can be an intersting thesis work - infrastructure for reuse and collaboration of programming language resources on the Internet. Ehud Lamm mslamm@pluto.mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-08-01 0:00 ` Ehud Lamm @ 1999-08-03 0:00 ` David C. Hoos, Sr. 1999-08-04 0:00 ` David Botton 1999-08-09 0:00 ` Samuel Tardieu 0 siblings, 2 replies; 14+ messages in thread From: David C. Hoos, Sr. @ 1999-08-03 0:00 UTC (permalink / raw) Ehud Lamm wrote in message ... <snip> >Another idea is evloving something like PERL's CPAN. The Source Code >Treasury seems like a very good starting point. > Speaking of Perl... I also had a need for an expression parser in an Ada program. After looking at what's available, and the time it would take to do what I need in Ada, I decided on embedding a Perl interpreter. I spent one day developing the package, and the test program, and testing the interpreter. You might want to consider such an approach. David C, Hoos, Sr. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-08-03 0:00 ` David C. Hoos, Sr. @ 1999-08-04 0:00 ` David Botton 1999-08-05 0:00 ` David C. Hoos, Sr. 1999-08-09 0:00 ` Samuel Tardieu 1 sibling, 1 reply; 14+ messages in thread From: David Botton @ 1999-08-04 0:00 UTC (permalink / raw) Is the package available for public consumption? David Botton David C. Hoos, Sr. wrote in message <7o7o47$91c@hobbes.crc.com>... >Speaking of Perl... I also had a need for an expression parser in an >Ada program. After looking at what's available, and the time it >would take to do what I need in Ada, I decided on embedding a Perl >interpreter. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-08-04 0:00 ` David Botton @ 1999-08-05 0:00 ` David C. Hoos, Sr. 0 siblings, 0 replies; 14+ messages in thread From: David C. Hoos, Sr. @ 1999-08-05 0:00 UTC (permalink / raw) David Botton wrote in message <7oatq8$1fp6$1@news.gate.net>... >Is the package available for public consumption? > >David Botton > >David C. Hoos, Sr. wrote in message <7o7o47$91c@hobbes.crc.com>... > >>Speaking of Perl... I also had a need for an expression parser in an >>Ada program. After looking at what's available, and the time it >>would take to do what I need in Ada, I decided on embedding a Perl >>interpreter. I'll try to make it available this weekend. In its present form it depends on my development environment (Makefiles, etc.) to be useful. I also need to write a README file. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-08-03 0:00 ` David C. Hoos, Sr. 1999-08-04 0:00 ` David Botton @ 1999-08-09 0:00 ` Samuel Tardieu 1 sibling, 0 replies; 14+ messages in thread From: Samuel Tardieu @ 1999-08-09 0:00 UTC (permalink / raw) >>>>> "David" == David C Hoos, <david.c.hoos.sr@ada95.com> writes: David> Speaking of Perl... I also had a need for an expression parser David> in an Ada program. After looking at what's available, and the David> time it would take to do what I need in Ada, I decided on David> embedding a Perl interpreter. Well, it would have probably been simpler to interface with the PCRE library (Perl Compatible Regular Expressions). Sam -- Samuel Tardieu -- sam@ada.eu.org ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-29 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Martin C. Carlisle @ 1999-07-30 0:00 ` Ted Dennison 1 sibling, 0 replies; 14+ messages in thread From: Ted Dennison @ 1999-07-30 0:00 UTC (permalink / raw) In article <Pine.A41.3.96-heb-2.07.990729112145.104782E-100000@pluto.mscc.huji.ac.i l>, Ehud Lamm <mslamm@mscc.huji.ac.il> wrote: > On Wed, 28 Jul 1999, Jeffrey D. Cherry wrote: > > |Although it's not a parser, a good place to start would be the OpenToken > |page: > | > | http://www.telepath.com/dennison/Ted/OpenToken/OpenToken.html > | > > Since it seems I'll have to hack something up myself, I'll give this a > clsoe look. From what i've seen it seems very nice. I have used it for several different tasks here at work, and have found it quite handy. But if there's something you could use that it doesn't do very well, please tell me. That goes for documentation as well. Now that my summer class is ending, I should have more time to devote to developing it. Parsing capability *will* be added in a future version. Wow. This would come up on the week I took off to work on my AI project. :-( > I'll take this opportunity to share an observation. Ada is designed > for reuse and for good SE practices. Since the latter discourage many > would be Ada hackers, we end up with less code to reuse. > Of course bad code shouldn't be reused, but the more code out there > the greater the chance some of it will be good. I don't really think that's entirely accurate. I figure there just aren't as many folks around who know Ada. Considering that, there really are a great deal of reusable Ada packages floating around. If anything, I'd say the language encourages it *more* than C, because it is much more portable. For instance, as part of my AI project I gave a go at porting the open-source game Empire to cygwin32. It already has #ifdef's and make rules in to support gcc on several Unix platforms and MSVC++. So both the compiler and the platform were already supported, just not together. After 8 hours of work on a Saturday that could have been much better spent playing with my kids, I finally gave up the ghost. I ended up having to hack it into a DLL so I could link it with Gnat. OpenToken, on the other hand, compiles as-is with no source changes on at least 3 different Ada compilers using 2 different OS'es that I know of. I have yet to receive a report of a portability problem. Its really sad to think of the amount of effort the world wastes in C porting... -- T.E.D. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-27 0:00 Expression Parser Ehud Lamm 1999-07-28 0:00 ` Jeffrey D. Cherry @ 1999-07-29 0:00 ` Brian Rogoff 1999-07-30 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Gautier 2 siblings, 1 reply; 14+ messages in thread From: Brian Rogoff @ 1999-07-29 0:00 UTC (permalink / raw) On Tue, 27 Jul 1999, Ehud Lamm wrote: > Does anyone know of simple embeddable exprssion parser that I can reuse? > Ideally should support numeric as well as string data, and if constructs. John English's excellent Ada intro uses an expression parser as one of his examples, and the code seemed easy to pick through IMO. The code is on his web page. http://www.it.bton.ac.uk/je/adacraft/. If its truly simple as you say then recursive descent is a quick enough way to code it up, and contrary to popular opinion, can certainly handle some grammars that are not LL(1). -- Brian ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-29 0:00 ` Brian Rogoff @ 1999-07-30 0:00 ` Ehud Lamm 0 siblings, 0 replies; 14+ messages in thread From: Ehud Lamm @ 1999-07-30 0:00 UTC (permalink / raw) On Thu, 29 Jul 1999, Brian Rogoff wrote: |John English's excellent Ada intro uses an expression parser as one of his |examples, and the code seemed easy to pick through IMO. The code is on |his web page. http://www.it.bton.ac.uk/je/adacraft/. Hi, I already checked his parser, in chapter 17. But I think I like your second option better. |If its truly simple as you say then recursive descent is a quick enough |way to code it up, and contrary to popular opinion, can certainly handle |some grammars that are not LL(1). Quite. As I said in my previous posts, or at least I think I said it - it seems I'll hack a recursive decent parser myself. Won't be the first time. In many cases it is faster to do that than use a parser generator, even when there are tons that float arround. Ehud Lamm mslamm@pluto.mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Expression Parser 1999-07-27 0:00 Expression Parser Ehud Lamm 1999-07-28 0:00 ` Jeffrey D. Cherry 1999-07-29 0:00 ` Brian Rogoff @ 1999-07-29 0:00 ` Gautier 2 siblings, 0 replies; 14+ messages in thread From: Gautier @ 1999-07-29 0:00 UTC (permalink / raw) 2 examples in Pascal: http://www.autosci.com/sample.txt http://atlas.csd.net/~cgadd/knowbase/MATH0050.HTM -- Gautier -------- http://members.xoom.com/gdemont/ ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~1999-08-09 0:00 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1999-07-27 0:00 Expression Parser Ehud Lamm 1999-07-28 0:00 ` Jeffrey D. Cherry 1999-07-29 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Martin C. Carlisle 1999-07-31 0:00 ` David Botton 1999-08-01 0:00 ` Ehud Lamm 1999-08-03 0:00 ` David C. Hoos, Sr. 1999-08-04 0:00 ` David Botton 1999-08-05 0:00 ` David C. Hoos, Sr. 1999-08-09 0:00 ` Samuel Tardieu 1999-07-30 0:00 ` Ted Dennison 1999-07-29 0:00 ` Brian Rogoff 1999-07-30 0:00 ` Ehud Lamm 1999-07-29 0:00 ` Gautier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox