[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to decide what to put in the lexer and the grammar respectively?
From: |
Simon Richter |
Subject: |
Re: How to decide what to put in the lexer and the grammar respectively? |
Date: |
Sun, 17 Feb 2019 18:57:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi,
On 17.02.19 14:08, Peng Yu wrote:
> [[:alpha:]_][[:alnum:]_]=[[:digit:]+] { /* parse yytext to get the
> name and value, then do the assignment */ }
The main reason you are using a lexer is to avoid writing code for
manual parsing. The lexer can already tell you where the equals sign is
and how long the identifier and value are, but only if they are separate
tokens.
Simon
signature.asc
Description: OpenPGP digital signature
- How to decide what to put in the lexer and the grammar respectively?, Peng Yu, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Akim Demaille, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Peng Yu, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Akim Demaille, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Peng Yu, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Hans Åberg, 2019/02/17
- Re: How to decide what to put in the lexer and the grammar respectively?, Akim Demaille, 2019/02/18
- Re: How to decide what to put in the lexer and the grammar respectively?, Hans Åberg, 2019/02/18
- Re: How to decide what to put in the lexer and the grammar respectively?, Akim Demaille, 2019/02/18
- Re: How to decide what to put in the lexer and the grammar respectively?, Hans Åberg, 2019/02/17
Re: How to decide what to put in the lexer and the grammar respectively?,
Simon Richter <=