manpagez: man pages & more
info bison
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1.3.3 User Defined Location Type

Instead of using the built-in types you may use the %define variable api.location.type to specify your own type:

%define api.location.type {LocationType}

The requirements over your LocationType are:


In programs with several C++ parsers, you may also use the %define variable api.location.type to share a common set of built-in definitions for position and location. For instance, one parser ‘master/parser.yy’ might use:

%defines
%locations
%define api.namespace {master::}

to generate the ‘master/position.hh’ and ‘master/location.hh’ files, reused by other parsers as follows:

%define api.location.type {master::location}
%code requires { #include <master/location.hh> }

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on December 1, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.