This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Language translation proposal 1.4


On Sun, Aug 13, 2000 at 06:19:54AM +0200, Mikael Djurfeldt wrote:
> [OK, here comes a new updated version.  Compared to the first
>  proposal, there's a new section on the module system.  I also talk
>  about data types and a foreign language escape syntax.  In addition,
>  I've adjusted the end-of-translation signalling for translate-all and
>  have added a note in the section about repl command language about an
>  alternative solution which has been proposed by Jost.
> 
>  Now I won't be able to participate in this discussion for a few days.
> 
>  Please Guile developers: Feel free to manage this document and this
>  discussion so that things can continue to develop while I'm working
>  on other things.
> ]

Unfortunately, I'm also away for this next week, and haven't had time to
look at everything in this document yet.  But a few notes:

> Each entry has the form:
> 
>   (REGEXP . LANGNAME)
> 
> where REGEXP is a string and LANGNAME a symbol or a list of symbols.
> 
> The alist can be accessed using `language-alist' which is exported
> by the module `(core config)':
> 
>   (language-alist)			--> current alist
>   (language-alist ALIST) 		sets the alist to ALIST
>   (language-alist ALIST :prepend)	prepends ALIST onto the current list
>   (language-alist ALIST :append)	appends ALIST after current list
> 
> The `load' command will match filenames against this alist and choose
> the translator to use accordingly.
> 
> There will be a default alist for common translators.  For translators
> not listed, the alist has to be extended in .guile just as Emacs users
> extend auto-mode-alist in .emacs.

Should load also potentially take a :language argument?  Maybe this is
getting to be too many ways...

> *** Repl command syntax
> 
> Normally, repl commands have the syntax
> 
>   ,COMMAND ARG1 ...
> 
> Input starting with arbitrary amount of whitespace + a comma thus
> works as an escape syntax.
> 
> This syntax is probably compatible with all languages.  (Note that we
> don't need to activate the lexer of the language until we've checked
> if the first non-whitespace char is a comma.)

In Python, at least, it is important that whitespace at the beginning
of the line is preserved.  So it would be fine to check if the first
non-whitespace character is a comma, but the whitespace needs to be
preserved.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]