taskText Extractor TXR - Tasks: task #11431, Implement horizontal functions and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #11431: Implement horizontal functions and allow function calls in horizontal matches.

Submitter:  Kaz Kylheku <kkylheku>
Submitted:  Wed 12 Oct 2011 05:55:32 PM UTC
   
 
Should Start On:  Wed 12 Oct 2011 07:00:00 AM UTC Should be Finished on:  Wed 12 Oct 2011 07:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Percent Complete:  100%
Open/Closed:  Closed Effort:  16.00

Thu 20 Oct 2011 11:12:59 PM UTC, comment #1: 

We probably want implicit blocks inside various horizontal directives. It's not really a dependency, but a good idea to do at the same time.

Kaz Kylheku <kkylheku>
Group administrator
Wed 12 Oct 2011 05:55:32 PM UTC, original submission:  

The @(define ...) directive allows query fragments to be defined as functions. These are line-oriented matchers. A function as a whole matches zero or more lines and is invoked on a query by itself.

This task is to allow horizontal functions to be called. This should be a separate binding for the symbol, so that for instance if both of these are given:

@(define foo (x))@{abc 1}@(end)

and

@(define foo(x)
@abc
@(end)

are both defined at the same time. A call on a line by itself, like

@(foo x)

will call the line-oriented one. But if it occurs within a line or has trailing horizontal material after it, then it calls the character-oriented flavor of the function.

If only the character-oriented one is defined, then that definition is called in all cases.

If only the line-oriented one is defined, then it is an error if it is called in a horizontal mode (the call is not the only element of the query line in which it occurs).

The semantics of a character-oriented function is that it matches characters within a line.  So for instance

@(define foo (x))@{x 1}@(end)

matches a single character and binds it to x. It fails if x is already bound and does not match that character. This can be called in the middle of a line, so that these two query lines are equivalent:

  I have @(foo z) task for you.
  I have @z task for you.

Of course, these functions are recursive, etc.

The @(forget)/@(locally) directive will have to be made horizontal for this to be maximally useful, as well as @(bind).




Kaz Kylheku <kkylheku>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Digest:
   task dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kkylheku (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-22 kkylheku Percent Complete0% 100%
        Open/ClosedOpen Closed
    2011-10-20 kkylheku Dependencies- Depends on task #11430

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code