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.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Wed 12 Oct 2011 05:55:32 PM UTC  
Should Start On: Wed 12 Oct 2011 07:00:00 AM UTCShould be Finished on: Wed 12 Oct 2011 07:00:00 AM UTC
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Percent Complete: 100%Assigned to: None
Open/Closed: ClosedEffort: 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>
Project 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)


@(define foo(x)

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>
Project Administrator


No files currently attached


   task dependencies.

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Nov 2011 10:23:10 PM UTCkkylhekuPercent Complete0%=>100%
    Thu 20 Oct 2011 11:12:59 PM UTCkkylhekuDependencies-=>Depends on task #11430

    Back to the top

    Powered by Savane 3.1-cleanup1