Hi. I'm working with Bison (and Flex) for the first time, and it's rough going.
I can't get Bison locations to work. The following toy parser
illustrates the problem.
Here's the file for Flex, bug.l:
---
%{
#include "
On Tue, Jun 2, 2009 at 5:06 PM, Hans Aberg wrote:
> On 2 Jun 2009, at 22:27, Kynn Jones wrote:
>
>> I can't get Bison locations to work.
>
> Bison now has a %locations option - see this link and its example.
> http://lists.gnu.org/archive/html/help-bison/2009-05/msg00
On Wed, Jun 3, 2009 at 1:28 AM, Luca wrote:
> Location are created by lexer and "reduced" by the parser, so you have to
> create them using the lexer:
>
> #define YY_USER_ACTION {yylloc.first_line = yylineno; yylloc.first_column =
> colnum; colnum=colnum+yyleng; yylloc.last_column=colnum; yylloc.l
Hi. I want to write a "base parser" for JSON that can be easily customized
to generate objects in any interpreted language (such as Perl or R) whose
underlying implementation is in C.
The idea is that I need a good way to plugin callbacks corresponding to the
various "parser events". E.g. I want