[Boost.Spirit] how to extend a grammar

3 Apr
2008
3 Apr
'08
7:53 a.m.
Lets say I have a simple calculator grammar like the one defined in trunk\libs\spirit\example\fundamental\calc_plain.cpp Now I would like to extend that grammar e.g. add support for sqrt() One way would be modifying the existing grammar class (patch provided) But what I would like is to create a new class that uses or inherits from the existing grammar class to provide the extended behavior. That is, I would need both the calculator and the extended_calculator classes available, and without code duplication. ¿Is this possible?
6169
Age (days ago)
6169
Last active (days ago)
0 comments
1 participants
participants (1)
-
dariomt@gmail.com