Hi,
On 3/22/22 9:24 PM, Ricard Gascons wrote:
I've been a Bison user for some time now, I've been writing some toy
projects here and there. I was wondering if there are online resources I
could find existing grammar from well-known programming languages? Just the
definitions, not the implementa
Hi,
On 5/6/22 11:12 AM, Szabolcs Horvát wrote:
This does indeed work in all versions, including 2.3. But it is
unclear to me if it is safe. Is it guaranteed that $end corresponds to
0?
To my knowledge, that is documented behaviour, yes.
Simon
OpenPGP_signature
Description: OpenPGP digi
Hi,
On 7/5/22 09:55, 徐研辉 wrote:
I encountered some troubles when attempting to recognize identifiers of C language via flex. As
for program shown below, what identifier returned by flex was "main", whereas bison
got "main(){
return 3;
}".
This is a rather common mistake: yytext is a poi
Hi,
On 10/10/22 13:37, andreas graeper via Users list for the GNU Bison
parser generator wrote:
i try to use an object ast.h/c/o and want a member of %union{ .. ast*a; ..
} to be a pointer to a type defined inthere. The header 'ast.h' is included
inside %{ .. %}
These are inserted too late
Hi Maury,
On Wed, Apr 12, 2023 at 06:38:35PM -0400, Maury Markowitz wrote:
> I am parsing a grammar that allows bracketing using (), [] and <>. It would
> simplify my code if I could do…
> open_bracket: ‘(‘ | ‘[‘ | ‘<‘ ;
> close_bracket: ‘)‘ | ‘]‘ | ‘>’ ;
> bracketed_expression : open_bracket
Hi,
On 9/29/23 15:37, Julian Hapke wrote:
having gotten used to using clang-format in C and C++ as well as black
in Python, I would like to try and write a file formatter for a
different language.
There will be a lot of personal preferences involved in this, plus you
will need to contend wi
Hi,
I have a grammar for ECMAScript, which has both brace delimited statement
blocks and brace delimited object literals, and allows expressions to be
used as statements, which creates conflicting interpretations for "{ }" as
either an empty block or an empty object.
The specification clarifies t
Hi,
On 30.11.2016 22:36, Hans Åberg wrote:
>> %token IF "if"
>> %token ELSE "else"
> This can be resolved by adding
> %nonassoc "then"
> %nonassoc "else"
Yes, that is what I'm doing, except that I need to give a precedence to
the closing parenthesis because there is no explicit "then" keywo
Hi,
I'm still building an ECMAScript parser, it's mostly running, except for
the Automatic Semicolon Insertion rule in the language: if a token stream
is invalid, but can be made valid by inserting a semicolon in front of the
current token, pretend that a semicolon is there.
For example inside a
Hi,
On Tue, Dec 06, 2016 at 10:52:06PM -0500, Ricky wrote:
> Your syntax implies that [\n] should be treated as [;]. So why not use [\n]
> as alternative?
Unfortunately, it's not that easy.
var foo = 4
+ 5
is also allowed. This can lead to interesting hidden bugs[1], but is valid.
Hi,
On 28.02.2017 21:54, Jack Bates wrote:
> TsConfigGrammar.h:125:20: error: ‘yyscan_t’ was not declared in this
> scope
> I can think of a couple ways around this -- what's the recommended
> solution?
I've found that none of these ways really work, so I just use
%parse-param { void *sc
Hi,
On 28.06.2017 21:33, David McCallum wrote:
> Are there changes pending for variant that might break my parser somewhere
> down the road? Or is it considered safe to use?
Presumably, neither, as I haven't seen any feedback on its usefulness.
One problem is that you cannot use std::unique_ptr
Hi,
On 09.11.2017 14:20, Bharath Gattu wrote:
> Previously we are using Bison and Flex in our project to generate some parser
> files automatically.
> But now we don't want those files to be generated automatically.
> We would like to keep the Bison accessible. But we want to remove the
> depen
Hi,
On 24.12.18 18:00, Akim Demaille wrote:
> Recent history has shown that bugs are discovered too late, in a rather
> incremental fashion (I'm about to release 3.2.4), mostly revealed when Bison
> is finally updated in the main distros. I believe that much of this could
> have been avoided
Hi,
I'm wondering what would be the best way to communicate from the lexer
to the parser that the lexer detected something it could not tokenize
(in my case, characters outside the allowed character set).
In this case, it is fairly obvious that we want to abort, without a call
to yyerror, but pro
Hi Akim,
On 06.01.19 09:10, Akim Demaille wrote:
> It has been asked to explicitly mark releases on git, so that CIs can trigger
> builds automatically with these releases. This is already the case: tags
> mark releases (betas and stable).
Will it be sufficient to test betas with existing pro
Hi,
On 08.02.19 02:01, Peng Yu wrote:
> It seems to me that the parsing code could be made simpler by making
> the parser reentrant. So there can be a parser parses anything not
> heredoc and another parser just parse heredoc. And there should
> different lexers for non-heredoc and heredoc. Is it
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
Hi,
On 22.02.19 15:00, workbe...@gmx.at wrote:
> [a-zA-Z]+ { printf("%s is not a verb", yytext); }
>
> .|\n { ECHO; /* normal default anyway */ }
> Now my question is when i enter one of the verbs it's working normaly
> like expected, but when i enter for example 234someword i also get the
> me
Hi Ervin,
On 08.12.19 19:46, Ervin Hegedüs wrote:
> I'ld like to control this feature through my code. I realized
> that this option set a variable in generated source file:
> 1577 extern int yy_flex_debug;
> 1578 int yy_flex_debug = 1;
> if (argc > 1) {
> if (strcmp(argv[1],
20 matches
Mail list logo