Boost logo

Boost Users :

Subject: [Boost-users] [Proto] Limiting function arity in grammar
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2008-10-02 15:59:37


How can I write a grammar that accept a given set of terminal and
functions with up to N arguments
(for example accepting function with 1 to 5 arguments but not 6 or more) ?

I believe i can count the elements of vararg using mpl::size ons ome
proto::arg_ or proto::value maybe
but how to prevent those who violates this condition be removed from the
accepted functions et ?

thanks in advance

-- 
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net