Hacker News new | past | comments | ask | show | jobs | submit | smitchell2's comments login

I would suggest Recursive Descent for general parsing, and Precedence Climbing for expressions.

Once you get the hang of Recursive Descent, parsing becomes mechanical. And with Precedence Climbing for expressions, you just plug in the appropriate operator priorities.

Some of the literature below refers to "parsing" as "syntax analysis".

See this introductory set of articles:

https://www.semware.com/html/compiler.html

Then see this (small, 160 page) book from Wirth:

http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf

See examples here - especially the C and Python examples: (lexical analysis examples included, since it must feed the parser)

http://rosettacode.org/wiki/Compiler/lexical_analyzer

http://rosettacode.org/wiki/Compiler/syntax_analyzer


I wrote one back in 1984-85 that I called QEdit, and have been using and updating it ever since.


QEdit's configurability was amazing. Back in the early 90s I had a completely hand built config, a feat I have never dared to repeat with subsequent editors. I wrote a lot of code in it at home, and nagged my employer into buying some licenses for the sophisticated programmers among the staff (it was a bank, so not many, but a few!). I would edit locally and FTP to the server rather than use vi directly there!

When my computer illiterate aunt decided to write a book back in the early 90s, I set her up with a minimalistic QEdit, a few bat files to perform backups, versioning, etc automatically and a floppy disk for each day of the week plus a daily backup one. Simple instructions and process, simple editing setup, and two years later the 670-page book was finished and published, and she was ready to actually learn how to use a computer.

So a big thank you for creating such an excellent tool!


QEdit FTW! Thank you! It was my go to editor for ages. Used it to write all my AutoCAD shareware.

It took me forever to unlearn the Wordstar key bindings.

I'll have to look it up.


Thanks for the kind words. I was forced to change the name a few years back (1992) - it is now called TSE, or The Semware Editor.

Unlearn Wordstar key bindings? Isn't that sacrilege? :-)


I have several former co-workers that wouldn't use anything but QEDIT/TSE.


Three that I've dabbled with are:

    - Euphoria   (http://openeuphoria.org/)
    - Wren       (http://wren.io/)
    - ChaiScript (http://chaiscript.com/)
Of those three, Euphoria is possibly the most widely used. It has also been around the longest - since 1993.


Thanks.

ChaiScript has a stackbased memory model so this would fit.

Wren has a garbage collector, so this would be probalby no option for me.

Euphoria is not on github so I have to search first how the gc works. Thanks again


Back in 1984, I purchased Turbo Pascal 2, and had several decent contracts writing various sorts of software.

In 1985 I wrote a simple programmers text editor in it (I really had no idea what I was doing - I learned as I went along), and released it as shareware.

Folks started sending me checks, and by 1988 I had to hire staff to help me process and ship orders, do tech support, and so on.

We peaked at 15 employees in the mid-90's. While I eventually converted everything to C, I still have very fond memories of Turbo Pascal. Those were the days!


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: