emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: APL mode


From: Rustom Mody
Subject: Re: APL mode
Date: Sun, 13 Oct 2013 12:29:25 +0530

On Sun, Oct 13, 2013 at 12:15 PM, Stephen J. Turnbull
<address@hidden> wrote:
> Rustom Mody writes:
>  > On Sat, Oct 12, 2013 at 7:56 PM, Stefan Monnier <address@hidden> wrote:
>  >> RM wrote:
>
>  >>> What does sexp mean for non-lisp languages like C etc?
>
>  >> It means "a subtree in the abstract syntax tree".
>
>  > In principle, that's fine. However in practice there are things like
> [...]
>  > c. (most important) emacs doesnt really do a full-scale context
>  >    free grammar analysis does it?
>
> If you use the semantic package, it can.  Most simple modes don't,
> although use of semantic is becoming more common.

My choice is to preferably stay simple even if that means not covering
20% of odd/corner cases.
Not to say that I am afraid of CFGs -- more afraid of regexps with 16
backslashes in a row!!

>  > So I guess I am asking: Emacs uses regular exps to fudge a
>  > semblance of context free structure. How does it do this?
>
> Either it uses semantic, or it mixes regexp "parsing" with use of
> regexps to match lexical tokens and custom lisp to parse.
>

Can you point me to somewhere to read as example?
I looked at C mode(s) but there is so much file-level structure I
could not figure out where the action is happening.

General note:
As a language, APL is probably quite simple if not trivial --
function definitions contain
lines contain
expressions.

No control structures, classes etc etc.

Rusi
-- 

http://blog.languager.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]