help-bison
[Top][All Lists]
Advanced

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

Re: tokens without input match


From: Martin Alexander Neumann
Subject: Re: tokens without input match
Date: Fri, 27 Apr 2018 17:11:26 +0200

Hi Anand,

Bison expects its input to come from a lexer, i.e. all inputs are valid
tokens of the language Bison parses. If a token cannot be "matched", the
input is invalid.

If you want to be able to skip any input that is not a valid token, you
have to skip it in the lexer.

Yours
Alex

On 27.04.2018 15:15, Anand Akhare wrote:
> in following code, bison matches for word1 and word2 for input
> but it doesn't bypass word3 while it matches, executes action and throws
> error.
> Is it possible that anything that doesn't reach till input can be blocked?
> 
> 
> input:  word1
>          | word2
> 
> word1 : WORD1
> 
> word2: WORD2
> 
> word3: WORD3
> 
> Thank a lot!
> Anand
> _______________________________________________
> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
> 



reply via email to

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