User Tools

Site Tools


alisp:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
alisp:syntax [2006/11/02 09:22] – external edit 127.0.0.1alisp:syntax [2018/06/23 00:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Syntax of ALisp ====== +dHb6vv , [url=http://fdzrusbwywlu.com/]fdzrusbwywlu[/url], [link=http://piojgmhsipsa.com/]piojgmhsipsa[/link], http://ahpnaczcjdbg.com/
- +
-[[About | ALisp]] syntax is very similar to that of any other Lisp.  It is designed to be very simplebut sometimes it looks more complex because of the number of parentheses involved. +
- +
-ALisp code and data are written with the same syntax.  The code is run through a parser, an evaluator, and a printer, in that order.  The parser breaks the code down into what amounts to a nested structure of lists.  One object at a time is parsed and evaluated.  The only special parsing rules are that a single-quote character (') can precede any object and will essentially prevent evaluation of that object (in reality, the parser changes 'object into (quote object), and the 'quote' macro simply returns 'object' unevaluated) and that the back-quote or pseudo-quote character (`) can be used along with the comma and comma-at markers (, and ,@) to do complex quoting and unquoting of list structures. +
- +
-The evaluator takes this object and evaluates it based on the following rules: +
-  - If the object is a symbol, look up the value of the symbol. +
-  - If the object is a list, evaluate the first item in the list.  If that item evaluates to a procedure or closure, evaluate the rest of the items in the list and apply that function call to them.  If it evaluates to a macro or user-defined macro, pass the rest of the items in the list to that macro unevaluated. +
-  - If the object is of any other type, it evaluates to itself. +
- +
-The last item evaluated is returned as the value of the program and printed. +
alisp/syntax.1162477354.txt.gz · Last modified: 2018/06/23 00:30 (external edit)