how it come i didn't realize that ;-)  !
thanks,
peter

On Fri, Jan 11, 2013 at 12:46 PM, Bence Fábián <[email protected]> wrote:
> for the third:
> /\+\+[a-zA-Z_]+[0-9a-zA-Z_]*/{
> x/\+\+/d
> a/++/
> }
>
> the braces stuff is pretty tough, but maybe someone will have an idea.
> however it is really easy to do it by hand in acme.
>
> click on the inside of the opening paren with a double click then click
> button 2
> (while still holding down button 1 from the double click) this will cut
> everything
> inside that and the matching paren. then highlight the remaining () and
> while
> still holding down button 1 push button3.
> Looks complicated written down but it's a really quick and easy to learn
> sequence.
>
>
>
> 2013/1/11 Peter A. Cejchan <[email protected]>
>
>> ## How to do this with [acme | sam | sed ]  ?
>> # compound commands
>> # remove outermost pair of braces:  abcd(x+(y-z))efgh  --> abcdx+(y-z)efgh
>>          [ no idea :-( ]
>> # remove semicolon before // comments:  xyz;[tab][space]*//  --> xyz
>>          [ Edit /;[     ]*\/\// Edit s/;//      # find and remove
>> semicolon
>> before // comments ]
>> # prefix to postfix operator: ++i --> i++
>>          [ Edit s/\+\+[a-zA-Z]+[0-9a-zA-Z]*/&++/ Edit s/\+\+/d]
>>
>> thanks,
>> ++pac
>>
>

Reply via email to