help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ver 1.50 crashes


From: rosing
Subject: ver 1.50 crashes
Date: Thu, 10 Oct 2002 12:05:55 -0600

Hi,

I was messing around with bison-1.50 and the following program causes
it to crash.  I tried reducing this program and I can't without
removing whatever causes it to crash.  Example: removing the BINOP
token, which isn't used or simplifying most other rules. If there's a
better place to send this please let me know.

Thanks,

Matt
-----------------BOF---------------------------
%token INTEGER
%token STRING
%token IDENT
%token EOS
%token INC
%token DEC
%token RANGE
%token TRANS

%token EXPR
%token IDENT
%token BINOP
%token STMT
%token STMTLIST

%token DEFINE
%token DEFSUB

%right '='
%left '^'
%left '-' '+'
%left '*' '/'
%left INC DEC
%left '[' '('
%left '|'


%% 

prog:  DEFINE def_list '#' stmt_list
     | DEFINE def_list                
     | stmt_list                    
     ;

def_list: def | def_list  def;

def:  IDENT ':' pexpr ';' ;

pexpr:
         STRING               trans 
       | INTEGER              trans 
       | pexpr pexpr            
       | pexpr '|' pexpr        
       | pexpr '*'            trans 
       | pexpr '+'            trans 
       | '(' pexpr ')'        trans 
       | '[' pexpr ']'        trans 
       | rule                 trans 
       | '(' pexpr op pexpr ')' trans
       ;

op: '='|'-'|'/'|'+'|'*'|RANGE;

trans: | '{' {gettrans=1;} TRANS '}' ;

rule: EXPR | IDENT | STMT | STMTLIST;

stmt_list: stmt | stmt_list sep_opt stmt ;

sep_opt: |','|':';

stmt: exp 
      | '{' stmt_list '}' 
      | ';' 
      ;
    

exp:      INTEGER                  
        | IDENT                    
        | STRING                   
        | exp  '=' exp             
        | exp '+' exp              
        | exp '-' exp              
        | exp  '*' exp             
        | exp  '/' exp             
        | exp INC                  
        | exp DEC                  
        | INC exp                  
        | DEC exp                  
        | exp '^' exp              
        | '-' exp                  
        | '(' exp ')'              
        | exp '(' stmt_list ')'  
        | exp '[' stmt_list ']'  
        ;

%%





reply via email to

[Prev in Thread] Current Thread [Next in Thread]