Csound Csound-dev Csound-tekno Search About

[Cs-dev] Parser Update

Date2006-10-15 21:58
From"Steven Yi"
Subject[Cs-dev] Parser Update
AttachmentsNone  

Date2006-10-16 03:25
FromAnthony Kozar
SubjectRe: [Cs-dev] Parser Update
Thanks for your excellent work on this front, Steven!  I really wish that I
could be more involved right now because these areas really interest me ...

Regarding "preprocessor" statements, some people (including myself) have
thought about how useful it would be to be able to expand #includes and
macros without perfing and to save the expanded orchestra as a text file.
Do you think that it will be possible to separate out this functionality
with the new parser?

Would it perhaps be better (at least "cleaner") to separate out all of the #
stuff into a true preprocessor?  This would add an extra pass to orchestra
parsing but might be beneficial if the score and orchestra preprocessors
could be combined.  I believe that there are some lingering bugs in the
score parser due to the interaction of the macro facility and the m and n
statements.  (m and n use macro-like names, so I am not sure how feasible
this is).

Anthony


Steven Yi wrote on 10/15/06 4:58 PM:

> I just wanted to send an update on the parser.

> Otherwise, after this, the big things left are if-then's, UDO's,
> #includes, and macro's.  There are also the not so often used
> expressions to implement (bitshifts and things like those) but I think
> those won't be so bad as the functions to do expressions are already
> setup and just need to add a case to a switch statement and handle it
> there.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-10-17 11:45
From"Steven Yi"
SubjectRe: [Cs-dev] Parser Update
AttachmentsNone  

Date2006-10-17 16:06
FromAnthony Kozar
SubjectRe: [Cs-dev] Parser Update
Steven Yi wrote on 10/17/06 6:45 AM:

> I have to say I don't know myself what's the best way to do the
> preprocessor.  The old parser runs it inline; the new parser right now
> is most separated into multiple passes, so adding a true preprocessor
> pass would make sense to me.

I think this is probably the best way to go.  I just figured some people
would complain about "inefficiency."

> We would probably have to add a stack of
> some sort for mapping processed lines with original lines and original
> file locations to do correct error reporting.

This would be most excellent!

> If the preprocessor stuff is inlined, then it'd be hard to do a pass
> to do the outputting of processed code, but then again, I can't
> imagine it being to difficult to do some code in python or just a
> standalone tool that can do the same thing.

This is true of course.  The only disadvantage being that a separate utility
would have to be maintained if changes were made to the way the preprocessor
works.

I have already written a simple(-minded) C++ program for expanding #includes
(but not macros).  I was thinking that it should probably be added to CVS,
perhaps as a new utility.  (Adding macro expansion would be nice as well).

Anthony Kozar
anthonykozar AT sbcglobal DOT net


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-10-18 04:15
From"Dr. Richard Boulanger"
SubjectRe: [Cs-dev] Parser Update
I would love these expander utilities.

Rick

On Oct 17, 2006, at 11:06 AM, Anthony Kozar wrote:

> Steven Yi wrote on 10/17/06 6:45 AM:
>
>> I have to say I don't know myself what's the best way to do the
>> preprocessor.  The old parser runs it inline; the new parser right  
>> now
>> is most separated into multiple passes, so adding a true preprocessor
>> pass would make sense to me.
>
> I think this is probably the best way to go.  I just figured some  
> people
> would complain about "inefficiency."
>
>> We would probably have to add a stack of
>> some sort for mapping processed lines with original lines and  
>> original
>> file locations to do correct error reporting.
>
> This would be most excellent!
>
>> If the preprocessor stuff is inlined, then it'd be hard to do a pass
>> to do the outputting of processed code, but then again, I can't
>> imagine it being to difficult to do some code in python or just a
>> standalone tool that can do the same thing.
>
> This is true of course.  The only disadvantage being that a  
> separate utility
> would have to be maintained if changes were made to the way the  
> preprocessor
> works.
>
> I have already written a simple(-minded) C++ program for expanding  
> #includes
> (but not macros).  I was thinking that it should probably be added  
> to CVS,
> perhaps as a new utility.  (Adding macro expansion would be nice as  
> well).
>
> Anthony Kozar
> anthonykozar AT sbcglobal DOT net
>
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net