Changeset 6514


Ignore:
Timestamp:
02/22/12 06:38:11 (3 months ago)
Author:
pmoura
Message:

Allow open lists of terminals in the body of grammar rules.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/RELEASE_NOTES.txt

    r6513 r6514  
    1515 
    16162.43.4 - March ??, 2012 
     17 
     18    Allow open lists of terminals in the body of grammar rules. 
    1719 
    1820    Added an example of combining constraints defined in different objects 
  • trunk/compiler/logtalk.pl

    r6513 r6514  
    20532053    '$lgt_prolog_feature'(Flag, Value). 
    20542054 
    2055 current_logtalk_flag(version, version(2, 43, 3)). 
     2055current_logtalk_flag(version, version(2, 43, 4)). 
    20562056 
    20572057 
     
    1657416574% translates a list of terminals: 
    1657516575 
    16576 '$lgt_dcg_terminals'(Terminals, S0, S, S0 = List) :- 
    16577     '$lgt_must_be'(list, Terminals), 
    16578     '$lgt_append'(Terminals, S, List). 
     16576'$lgt_dcg_terminals'(Terminals, S0, S, Goal) :- 
     16577    '$lgt_must_be'(nonvar, Terminals), 
     16578    (   '$lgt_is_list'(Terminals) -> 
     16579        '$lgt_append'(Terminals, S, List), 
     16580        Goal = (S0 = List) 
     16581    ;   '$lgt_must_be'(list_or_partial_list, Terminals), 
     16582        Goal = {'$lgt_append'(Terminals, S, S0)} 
     16583    ). 
    1657916584 
    1658016585 
Note: See TracChangeset for help on using the changeset viewer.