Author Archives: neilbrown

edlib – render-lines, what a good idea.

I had a brain-wave last week.  I thought it would take me about a day to implement but it took 3 to get it working almost reasonably and the rest of the week to polish it and create some proper … Continue reading

Posted in edlib | Leave a comment

edlib – commands

It been over 3 months – maybe you thought I had given up – but no.  I had some holidays and other distractions, but I’m back and will be working fairly consistently for a while. The topic for today is … Continue reading

Posted in edlib | Leave a comment

edlib – managing input

Commands to an editor – at least the sort of editor that edlib is designed for – usually involve single keystrokes or key combinations.  Translating those keystrokes, as well as mouse actions, into commands is the topic of this note.  … Continue reading

Posted in edlib | Leave a comment

edlib – displays and panes

Displaying the document being edited is, of course, very important for any editor. I have memories of the first editor I used on Unix which was em, rather than the well known “ed”.  It actually allowed a single line to … Continue reading

Posted in edlib | Leave a comment

edlib – because one more editor is never enough.

I’ve decided to write an editor.  Silly idea I know – there are already two out there: both vim and emacs are quite good.  I’ve heard rumors that there might be others, but investigation always shows they are just toys, … Continue reading

Posted in edlib | Leave a comment

Structured statements and expressions in Ocean

Now that I have my general parsing worked out and understand how I want to use indents and line breaks to give a two dimensional structure to my language, I need to think about the details of some of the … Continue reading

Posted in Language Design | Leave a comment

A case for multiple completed items in LR parser states.

In my earlier note about LR parsing I observed that  many simple grammars will only ever have at most one REDUCE action in any given state. This means that there is no need for an “action table” to list which … Continue reading

Posted in Language Design | Leave a comment

Line breaks – a reprise.

In two previous articles I explored an approach to enhancing an LR parser to work with indents and line breaks.  While I discovered some useful ideas and produced some code that seemed to work, I’ve subsequently discovered some serious flaws … Continue reading

Posted in Language Design | Leave a comment

Linebreaks in a two-dimensional language

My previous note introduced the problem of parsing a two-dimensional language and the need to pay attention to indenting and line breaks and use them to guide the parsing of the language, both to enhance error detection, and to resolve … Continue reading

Posted in Language Design | Leave a comment

Parsing a two-dimensional language.

Many programming languages are essentially one dimensional.  The parser treats them simply as a linear sequence of tokens.  A program could all be written on a single line, or with each token on a separate line and the parser or … Continue reading

Posted in Language Design | Leave a comment