POV-Ray : Newsgroups : povray.off-topic : Adventures with C++ : Adventures with C++ Server Time
28 Jul 2024 18:11:38 EDT (-0400)
  Adventures with C++  
From: Orchid Win7 v1
Date: 13 May 2013 14:09:29
Message: <51912c59$1@news.povray.org>
Today, I wrote a parser in C++.

The slightly alarming thing is that it almost works correctly too. (It's 
not quite finished yet.)

And no segfaults! It turns out that if you throw enough STL containers 
at the problem, you can make it work without any manual pointer 
manipulation. (I shudder to think what the performance is like... 
Fortunately the input to the parser will always be small.)

It took 4 employees approximately 4 hours to get VisualStudio to 
successfully compile and link the code. (There are external 
dependencies, and the program is split into two projects which have to 
cross-reference each other correctly, and so on.) VS is really very 
clunky with C++ code.

It then took me about half an hour to write the parser test cases, and 
the rest of today to write the actual parser. Nested subexpression 
parsing still isn't working quiet right yet, so I need to go take a look 
at that.

I must say, when I signed up for a job as a C# programmer, I didn't 
think I'd spend 3 months writing Bash scripts, two weeks writing 
VBScript and then a day writing C++ code... :-P


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.