Software Development

Poll: Have you written a parser or a compiler?

Many Computer Science courses require students to write their own parser or compiler. Justin James is curious to know how many developers have this kind of experience. Take the poll to let us know.

One of the exercises that many Computer Science courses have students complete is to write their own parser or compiler. Throughout my career, there have been a few occasions in which I had to write a small parser. And the current trend towards DSLs is making it more common for folks to write a little parser or compiler of their own. Since I will be writing sample code in a few weeks that shows how to write a small interpreter in .NET, I am curious about how many developers already have this kind of experience.

J.Ja

About

Justin James is the Lead Architect for Conigent.

7 comments
radhakr
radhakr

Not everyone need to know how to write a low level programming. These types of translations are expected to be provided by the containers.

Marty R. Milette
Marty R. Milette

Data often arrives in forms other than nice little properly formatted CSV or XML files. Any software developer SHOULD have exposure to parsing (at least) -- so they can hit the ground running importing and transforming data. It also teaches a LOT about writing durable code that doesn't explode (or compromise the system) in the even of 'unexpected input'. I'd also add on the requirement for a comprehensive knowledge of regular expressions -- as this is a tool (along with the underlying libraries) that can be used to do a lot of the grunt work of parsing and data transformation.

Tony Hopkinson
Tony Hopkinson

many moons ago Z80 mnemonics to machine code. Parsers, too many.. Two different animals you know.

sesdan
sesdan

that would probably be more of an assembler, which is technically the back-end of older style compilers, but what the heck.. still takes a lot of work

Tony Hopkinson
Tony Hopkinson

Nver had a C64, went to the C128, that had two procesors the Z80 did CP/M. Had a memotech 512, can't rememeber waht that was and a Dragon32 with the best one of them all in my opinion Motorola 6809. Still got my Rodnay Zaks bibles kicking about somewhere in the loft.... 6502 was the first one I ran into, nutty professor at school built one in to a 19 rack case.

sesdan
sesdan

You're right.. same stuff no matter what. I wrote an assembler for the 6502, and editor.. all in assembly.. so I know your pain.. but what fun.. and I am guessing you had a C64 computer somewhere in that stack in addition to your Z80 based machine.. those were the fun days. There is no better way to learn about hardware/software than to bring it up from scratch. And yes, I remember those hex programs, and how error prone it was to enter them, till somebody started using a crc checker to help us out.. good thinking. What platform was the Z80 on?

Tony Hopkinson
Tony Hopkinson

and resulted in an 'exe', no linking of course, or optimisation. It did have labels, constants, indexing, relative addressing and such. Not a trivial exercise for somone with near no formal education in computing, at the time. Probably also an exercise that would outright stump lot of the recentky qualified as well. Remember the magazines where they used to give you a hex dump of a program, that were always full of typos. :p That's why I wrote it, damned good learning exercise though, I learnt shed loads about the Spectrum ROM, achitecture and the Z80 itself. Next project was an emulator/debugger, that was a real challenge, moved to the C128 before I finished it I seem to remember.

Editor's Picks