[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Skeleton lalr1.cc and lex_() function
From: |
Matthias Mann |
Subject: |
Skeleton lalr1.cc and lex_() function |
Date: |
Tue, 14 Jan 2003 00:00:08 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 |
Hi,
I just discovered that the function lex_(), error_() and print_() are
all virtual (super !) but are private. How can someone overwrite such a
function if it's private ?
The member variables are olso private. So I can't overwrite these
function to install a lexer that uses my base class data.
I've attached the diff that I use to implement my parser.
Ciao Matthias Mann
141,143c141,145
< # define YYLLOC_DEFAULT(Current, Rhs, N) \
< Current.last_line = Rhs[N].last_line; \
< Current.last_column = Rhs[N].last_column;
---
> # define YYLLOC_DEFAULT(Current, Rhs, N) \
> Current.first.line = Rhs[1].first.line; \
> Current.first.column = Rhs[1].first.column; \
> Current.last.line = Rhs[N].last.line; \
> Current.last.column = Rhs[N].last.column;
200c202
< virtual int parse ();
---
> int parse ();
202c204
< private:
---
> protected:
298a301,304
> #define YYACCEPT goto yyacceptlab
> #define YYABORT goto yyabortlab
> #define YYERROR goto yyerrlab1
>
618a625,634
> void
> yy::]b4_parser_class_name[::print_ ()
> {
> }
>
> void
> yy::]b4_parser_class_name[::error_ ()
> {
> }
>
smime.p7s
Description: S/MIME Cryptographic Signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Skeleton lalr1.cc and lex_() function,
Matthias Mann <=