There is a lexer and parser in the intellij plugin code. I think these
could be used as a starting point..  lexing (ie.deciding on what is an id,
number or keyword) is relatively easy, mostly lex regexps with some special
cases.

The hard part is accounting for indented blocks in the grammar.. there is
code for that in the plugin (Linearise.java), based on the aldor and Fricas
code bases. Be warned that it isn't pretty, with are a lot of edge cases.
To be expected given the problem domain, I guess.

At the grammar level the spad and aldor languages are pretty similar and
can be dealt with together, but there's enough differences to force some
special cases. The plugin covers most of this, but I'd have to remind
myself of the details. It covers about 98% if both code bases.

Happy to help with any questions you have.

Peter

On Wed, 26 Jul 2023, 00:56 Grégory Vanuxem, <[email protected]> wrote:

> II guess I have to start with src/boot/typrops.boot.
> But if you know some other sources, for example for Aldor or
> differences between the Spad language and the interpreter language,
> that would. great.
>
> --
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZEGn-K3P38ZYScv-6kBSEFA_HyEnfbSb0pnwviKRyCYQ%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAK%3DmBN8xSz5a6%2BZ7FHt2c1F81o2W1xRyAOekLBOrCdbVuvgjdw%40mail.gmail.com.

Reply via email to