<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Gentium">Hello!</font><br>
</p>
<div class="moz-cite-prefix">On 6/24/23 15:13, Ondrej Zajicek wrote:<br>
</div>
<blockquote type="cite" cite="mid:ZJbr5xkVOYf7ZndI@feanor">
<pre class="moz-quote-pre" wrap="">On Thu, Jun 15, 2023 at 03:57:10AM +0200, Alexander Zubkov wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Also, I think that the current realization in bird relies on the fact
that lexer would not have symbols parsed in advance, i.e. that further
mentions of the keyword should return CF_SYM_KNOWN. But if it is not
the case and the lexer parses forward for some reason (before the
parser creates the symbol for the keyword) it would not return
CF_SYM_KNOWN. I don't know the internals of the lexer and parser much,
maybe it is impossible situation (parser does not backtrack, etc.).
And there is no need to worry here.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Yes, it is kind of strange, in long-term, it would make more sense to move all
symbol processing from lexer to parser.</pre>
</blockquote>
<p>I was moving the symbol processing from parser to lexer several
years ago due to Bison limitations. Flex afaik guarantees that it
only parses one token at a time. The Bison-Flex boundary is a
nasty can of worms and I'm afraid that the best way to get rid of
it is to get rid of it altogether. Yet for now, I'd prefer keeping
it as is.</p>
<p>BTW the new method-call code (branch mq-func-types) depends
exactly on the fact that I can manipulate lexer state/context from
parser immediately before parsing the following token.<br>
</p>
<p>Maria<br>
</p>
<pre class="moz-signature" cols="72">--
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.</pre>
</body>
</html>