LangLisp

class LangLisp : Lang

This is similar to the lang-lisp.js in JavaScript Prettify.

All comments are adapted from the JavaScript Prettify.

Registers a language handler for Common Lisp and related languages.

To use, include prettify.js and this file in your HTML page. Then put your code in an HTML tag like

(my lisp code)

The lang-cl class identifies the language as common lisp. This file supports the following language extensions: lang-cl - Common Lisp lang-el - Emacs Lisp lang-lisp - Lisp lang-scm - Scheme lang-lsp - FAT 8.3 filename version of lang-lisp.

I used http://www.devincook.com/goldparser/doc/meta-language/grammar-LISP.htm as the basis, but added line comments that start with ; and changed the atom production to disallow unquoted semicolons.

"Name" = 'LISP' "Author" = 'John McCarthy' "Version" = 'Minimal' "About" = 'LISP is an abstract language that organizes ALL' | 'data around "lists".'

"Start Symbol" = s-Expression

{Atom Char} = {Printable} - {Whitespace} - ()"\''

Atom = ( {Atom Char} | '\'{Printable} )+

s-Expression ::= Quote Atom | Quote '(' Series ')' | Quote '(' s-Expression '.' s-Expression ')'

Series ::= Series |

Quote ::= '' !Quote = do not evaluate |

I used Practical Common Lisp as the basis for the reserved word list.

Author

mikesamuel@gmail.com

Constructors

Link copied to clipboard
fun LangLisp()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun getFileExtensions(): List<String>