[Ecls-list] ffi:c-inline @ preprocessing and '

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat Mar 20 21:19:41 UTC 2010


*.d and *.lisp files are different, they use diferent syntax and all you
need to care about as a user is c-inline.

ffi:c-inline uses @ and the LISP READER to read an object after that first
'@' and process it. As such @'alpha gives the compiler 'alpha or (quote
alpha) and @10 gives the compiler the integer 10 and @(1 2 3) gives the list
(1 2 3). That's all.

*.d files on the other hand rely on an ugly, simple-minded parser where
@'..', @[...] and other things have special meanings for, again, an ugly and
incompatible language, suitable for a simple C program.

On Sat, Mar 20, 2010 at 10:09 PM, Matthew Mondor
<mm_lists at pulsar-zone.net>wrote:

> Hello again,
>
> I noticed that some of the source .d files use a pair of ' quotes with
> @ (i.e. in file.d: @':full', etc).  However when doing this in
> FFI:C-INLINE C code I get a C compiling error about an extra ', so that
> the following has to be used: @':full
>
> error: missing terminating ' character
>
> Is this expected?  If it isn't and needs to be fixed, I hope that
> there's not too much FFI code relying on using a sole single quote in
> these cases (I have a few of them here).
>
> Thanks,
>
> --
> Matt
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>



-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100320/481181cd/attachment.html>


More information about the ecl-devel mailing list