Christian M. Cepel wrote:
Might it not be interesting to start a project on Sourceforge with CVS tracking for a centralized open source parser module or engine that can be utilized by everyone?

Hear, hear. Whoever's interested is free to use the facilities of the abc.sf.net project. Send me your SourceForge user name and I make you a project member and even admin if you want.


Stephen Kellett wrote:
> Christian M. Cepel <[EMAIL PROTECTED]> writes
>> I would assume that such a beast would be written in straight ansi c
>> to make it available to any present  or future operating system
>> sporting a c compiler, as well as to make it as small and as resource
>> non-intensive as possible.
>
> C++ Surely? C is very restrictive in comparison. Writing object based
> code in C is hard work (read: un-necessary extra code, and lack of
> type safety) compared to C++.

Why only writing a parser for one language (either C, C++, C# or Java)? Surely it should be possible to generate a parser for any language from a BNF grammar specification using a parser generator like SLK? Incidentally, SLK is available for both Win32 as Linux.

> Java and C# are not worthwhile alternatives. Both quite restrictive
> because nothing is truly passed as a reference (try modifying a string
> object you pass in and see if it really was changed after the method
> call - if it was really passed as a reference it would be). Makes
> things  trivial in C and C++ a real pain in Java and C#.

Java Strings are immutable objects. This allows for some optimisations, but it has its consequences. In general, primitive types are passed by value, while objects (including arrays) are passed by reference. But a String object can't be changed, so, indeed, what you describe here will not work...

Cheers,

bert
--
Bert Van Vreckem      <http://flanders.blackmill.net/>
Te audire non possum. Musa sapientum fixa est in aure.
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to