News for hackers. Stuff that matters.

smitchell2

Re:Ask HN: How did you learn parsing? on Wednesday April 17, 2019 @01:43PM (#19684721)
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

Re:Build Your Own Text Editor on Friday April 07, 2017 @07:19AM (#14058774)
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? :-)

Re:Build Your Own Text Editor on Thursday April 06, 2017 @10:28AM (#14050783)
I wrote one back in 1984-85 that I called QEdit, and have been using and updating it ever since.

Call for compiler hackers

I've created some compiler related tasks on RosettaCode. The goal is to create a simple compiler in small pieces: Scanner, Parser, Code Generator, and Virtual Machine Interpreter tasks have been created. Scanner http://rosettacode.org/wiki/Compiler/lexical_analyzer Parser http://rosettacode.org/wiki/Compiler/syntax_analyzer Code Generator ...

( Read More... | no comments | 3 points | on HN )
Re:Ask HN: Survey: Scripting languages for realtime applications on Thursday February 23, 2017 @11:17AM (#13715065)
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.
Re:Turbo Pascal Compiler (2013) on Tuesday January 24, 2017 @04:20PM (#13475590)
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!