Re: custom error reporting with c++

2025-01-09 Thread Christian Schoenebeck
On Wednesday, January 8, 2025 2:20:37 PM CET r0ller wrote: > Hi All,I'm trying to make use of custom error reporting and define the > function yyreport_syntax_error() in the epilogue based on the documentation > at https://www.gnu.org/software/bison/manual/html_node/Syntax-Error-> > Reporting-Func

Re: yytname woes

2023-11-16 Thread Christian Schoenebeck
On Tuesday, November 14, 2023 6:16:56 PM CET James K. Lowden wrote: > On Wed, 15 Nov 2023 12:35:31 +0100 > Christian Schoenebeck wrote: [...] > Bison has seen a lot of technical improvement over the years. There is > a C++ interface, a push interface, and a choice of generated pars

Re: yytname woes

2023-11-15 Thread Christian Schoenebeck
On Monday, November 13, 2023 12:13:55 AM CET James K. Lowden wrote: > On Mon, 13 Nov 2023 20:15:44 +0100 > Christian Schoenebeck wrote: > > > > You tell me: what is a "Bison token code"? > > > > Look, I am not judging how well Bison is documented or wha

Re: yytname woes

2023-11-13 Thread Christian Schoenebeck
On Sunday, November 12, 2023 6:18:30 PM CET James K. Lowden wrote: > On Mon, 13 Nov 2023 12:33:57 +0100 > Christian Schoenebeck wrote: > > > > When I look up #899, NOT, I get "NOT". But when I look up #900, > > > NE, I get "'<'"

Re: yytname woes

2023-11-13 Thread Christian Schoenebeck
On Friday, November 10, 2023 1:57:59 AM CET James K. Lowden wrote: > I can't seem to look up token names in yytname correctly using enum > yytokentype. > > At the end of enum yytokentype, I have > > END_UNSTRING = 893,/* END_UNSTRING */ > END_WRITE = 894, /* END

Re: can i rewrite yyparse() based on ACTION and GOTO tables extracted from XML output?

2021-11-06 Thread Christian Schoenebeck
erns. For instance right now, whenever you have some input, the lexer must always assume that any of the patterns may match. Whereas a tied grammar/lexer would have the knowledge that for a certain parser state, only a small set of patterns may match, which in turn would allow much more compact and faster lexer branches for those states to be generated. Best regards, Christian Schoenebeck

Re: Syntax error messages

2021-10-01 Thread Christian Schoenebeck
On Freitag, 1. Oktober 2021 09:37:52 CEST Hans Åberg wrote: > > On 28 Sep 2021, at 14:10, Christian Schoenebeck > > wrote:> > > On Montag, 27. September 2021 22:07:33 CEST Hans Åberg wrote: > >>>> In order to generate better syntax error messages writing out

Re: Syntax error messages

2021-09-28 Thread Christian Schoenebeck
vel column & line span, and sometimes you rather need low level raw byte position & byte length in the input data stream. Best regards, Christian Schoenebeck

Re: I cant resolve my reduce/reduce comflicts

2021-08-13 Thread Christian Schoenebeck
flicts. But if you are going to add actions for handling math formulas then you probably want the order in which the actions are executed to be correct, otherwise it would yield in wrong results when evaluating expressions. Best regards, Christian Schoenebeck

Re: [License]Is Bison exception only valid on Bison 2.2?

2021-07-26 Thread Christian Schoenebeck
g/archive/html/help-bison/2019-01/msg00013.html I mean it is probably just a theoretical issue. The intention of that definition was presumably not prohibiting commercial meta compilers, but in the end it would be a gray zone to be considered as part of your responsibility. Best regards, Christian Schoenebeck

Re: text is not parsed correctly due to shift/reduce conflict

2021-07-26 Thread Christian Schoenebeck
; > vardeclaration: > type_ptr identifierlist ; > example: int *b > > identifierlist : > identifierwithdefault | > identifierlist ',' identifierwithdefault > > identifierwithdefault: > identifier | > identifier '=' expression | > identifier '[' INTNUM ']' > > > type_ptr : > type_ptr '*' | > type ; > example: int Best regards, Christian Schoenebeck

Re: Possible to declare move constructor of basic_symbol as noexcept?

2021-01-30 Thread Christian Schoenebeck
; Le 19 janv. 2021 à 13:36, Christian Schoenebeck a écrit : > >> diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4 > >> index cfd4e6ed7..3496450e2 100644 > >> --- a/data/skeletons/c++.m4 > >> +++ b/data/skeletons/c++.m4 > >> @@ -309,7 +309,9 @@ m4

Re: Possible to declare move constructor of basic_symbol as noexcept?

2021-01-19 Thread Christian Schoenebeck
me you are still always using std::move() below though. Despite the compiler crash, which shouldn't happen of course, that should be either noexcept & std::move() otherwise no std::move() at all, at least with recent compilers. Not sure what your intention was to leave std::move() unconditionally there, I guess for pre-C++11 compilers? Best regards, Christian Schoenebeck

Re: Reporting malloc failure in actions

2020-12-31 Thread Christian Schoenebeck via Users list for the GNU Bison parser generator
stedlab; > #endif You would be dealing with internals, but AFAICS that internal label already exists for decades, so it'll be okay as pragmatic solution I guess. > > } > > memset(p, 0, n); > > What about using calloc() rather than the combination of malloc() and > memset()? Yes, calloc() would be an appropriate replacement. Best regards, Christian Schoenebeck

Re: Tokens to patterns?

2020-12-31 Thread Christian Schoenebeck
file side and then determine whether there is already a macro or symbol "FOO" defined in any source or included header file? Best regards, Christian Schoenebeck

Re: Reporting malloc failure in actions

2020-12-30 Thread Christian Schoenebeck
fprintf(stderr, "Parser: malloc(%s) with size %zu failed. Aborting.\n", expr, n); abort(); } memset(p, 0, n); return p; } ... variable_assignment: VARIABLE '[' expr ']' ASSIGNMENT expr { const char* varName = $1; const size_t varSize = $3; Foo* foo = PARSER_ALLOC(varSize * sizeof(Foo)); ... } Best regards, Christian Schoenebeck

Re: Meson build definition

2020-12-20 Thread Christian Schoenebeck via Users list for the GNU Bison parser generator
jects that are typically built in rather conservative environments, as it is the case with Bison. Right now you typically need a bleeding edge Meson version for being able to build more complex projects with Meson. Qemu just switched to Meson; they pull a specific Meson version in-tree as git submodule in the Qemu git repository. But really, that's an effort on its own. Best regards, Christian Schoenebeck

Re: Trailing comments in bison

2020-12-06 Thread Christian Schoenebeck
assume this is not an uncommon issue, what's the canonical solution? What's your intention with comments, do you really need them on grammar side for something? If yes, example purpose? Usually comments are just dropped on lexer side, in which case you don't "return" anything on lexer side, and that would probably alrady fix the problem you have, without adjusting anything on grammar side that is. Best regards, Christian Schoenebeck

Re: confusing bison error

2020-11-27 Thread Christian Schoenebeck
s (KDevelop, Kate, Kwrite, ...) also share the same syntax highlighting backend and also do Flex highlighting correctly. Some proprietary IDEs do not. For instance Xcode (12.2) displays these incorrectly as comments on column 0. I just filed a bug report with Apple. Best regards, Christian Schoenebeck

Re: confusing bison error

2020-11-27 Thread Christian Schoenebeck
eport end was a bit uncaring and > hostile imo. I wasted too much time with it. Please do us all a favour and use quote characters when you are quoting somebody in your emails. It's unnecessary to let people decipher who wrote what, as any email client can do that for you automatically, including the one you are using there. Best regards, Christian Schoenebeck

Re: C preprocessor

2020-08-17 Thread Christian Schoenebeck
point. Of course you can also create a structure in the very same way by just adjusting the scanner actions. My point was you don't need a parser (e.g. Bison) for such simple tasks, as preprocessor tasks are usually and entirely covered by the scanner. Best regards, Christian Schoenebeck

Re: C preprocessor

2020-08-14 Thread Christian Schoenebeck
\"[^"]*\" { yyextra->token = StringLiteralToken(yytext); return STRING_LITERAL_TYPE; } /* Number literal */ {DIGIT}+("."{DIGIT}+)? { yyextra->token = NumberLiteralToken(yytext); return NUMBER_LITERAL_TYPE; } /* Other tokens */ <*>. { yyextra->token = OtherToken(yytext); return OTHER_TOKEN_TYPE; } %% Best regards, Christian Schoenebeck

Re: Parsing a language with optional spaces

2020-08-09 Thread Christian Schoenebeck
ive should check my use of > >> French expressions, I'm not I'm using it properly :-). > >> > >> I can add *more* options, provide better alternatives, but Bison cannot > >> afford to drop features just like that. > > > > Please do, I would appreciate if you share ideas! > > You mean, ideas of new features? I have cited a bunch of them already, > and others are in the TODO file, but currently those that are close to my > heart include: > > - support for multiple start symbols Hmm... I don't see a big advantage of that in practice. It just saves you one non-terminal. > - integration of the scanner Definitely, and that context-aware! ;-) > - scoped precedence/associativity directives Like in which way did you imagine that? > - grammar modules Probably nice to have, but I think not a big game changer in practice either. > - rewritten glr.cc Ok, I don't know the implementation details there that made you thinking that. > - elimination of chain rules Elimination by transformation to what? Best regards, Christian Schoenebeck

Re: Parsing a language with optional spaces

2020-07-20 Thread Christian Schoenebeck
On Samstag, 18. Juli 2020 08:47:07 CEST Akim Demaille wrote: > > Le 14 juil. 2020 à 13:31, Christian Schoenebeck > > a écrit : > > > > On Montag, 13. Juli 2020 07:56:57 CEST Akim Demaille wrote: > > > > For the 'married' parser, in the form imagine

Re: Parsing a language with optional spaces

2020-07-14 Thread Christian Schoenebeck
On Dienstag, 14. Juli 2020 07:02:36 CEST Akim Demaille wrote: > > Le 13 juil. 2020 à 07:56, Akim Demaille a écrit : > >> Le 12 juil. 2020 à 19:47, Christian Schoenebeck > >> a écrit :>> > >> And BTW: > >>> The GLR parsers require a compiler

Re: Parsing a language with optional spaces

2020-07-14 Thread Christian Schoenebeck
On Montag, 13. Juli 2020 07:56:57 CEST Akim Demaille wrote: > > Le 12 juil. 2020 à 19:47, Christian Schoenebeck a écrit : > >> Additionally,the programmer must fully understand how > >> and when the parser handles tokens, otherwise subtle bugsmay be > >> intr

Re: Parsing a language with optional spaces

2020-07-12 Thread Christian Schoenebeck
is rarely happens, and for many grammars it is > possible to prove that it cannot happen. ... why isn't it O(n^3)? Or more specifically, which common GLR fork optimization(s) are yet missing? And BTW: > The GLR parsers require a compiler for ISO C89 or later. Tough requirement! ;-) Best regards, Christian Schoenebeck

Re: Parsing a language with optional spaces

2020-07-08 Thread Christian Schoenebeck
anguages. And on the other side it would eventually allow to design languages in a much more user friendly and flexible way as well, as it would be straight-forward e.g. to restrict keywords (or other patterns) to certain grammar contexts only. Best regards, Christian Schoenebeck

Re: Parsing a language with optional spaces

2020-07-08 Thread Christian Schoenebeck
BASIC examples could much easier (less complex) and elegantly be solved with a monolithicly combined parser-scanner, as the parser could then out of the box detect keywords depending on the grammar context. Best regards, Christian Schoenebeck

Re: Parsing a language with optional spaces

2020-07-06 Thread Christian Schoenebeck
On Montag, 6. Juli 2020 21:48:19 CEST Maury Markowitz wrote: > > On Jul 6, 2020, at 1:30 PM, Christian Schoenebeck > > wrote: Which would resolve that ambiguity of > > your example, if it actually exists, as I have never seen "FOREX" as > > valid BASIC loop defin

Re: Parsing a language with optional spaces

2020-07-06 Thread Christian Schoenebeck
I > hope you don't all mind the duplicate. > > On Jul 6, 2020, at 9:04 AM, Christian Schoenebeck > > wrote: > > You would simply add a RegEx pattern & rule like this: > Consider two snippets in home-computer-era BASIC: > > FOREX=10 > > and: > &g

Re: Which lexer do people use?

2020-07-06 Thread Christian Schoenebeck
On Montag, 6. Juli 2020 14:00:17 CEST Maury Markowitz wrote: > > On Jul 4, 2020, at 6:46 AM, Christian Schoenebeck > > wrote: The only thing that people are missing > > once in a while on scanner side is unicode support > > I am missing the capability to support gramm

Re: Which lexer do people use?

2020-07-04 Thread Christian Schoenebeck
having the scanner functionality directly in Bison instead, and saying goodbye to all those scanner state stack hacks which often end up in a huge mess that people can hardly read, and often lead to severe misbehaviours on edge cases of certain inputs. Akim, was there any progress in the IP discussion for that to become possible one day or is that previously discussed merge off the table? Best regards, Christian Schoenebeck

Re: how to get left hand side symbol in action

2020-06-10 Thread Christian Schoenebeck
ich case regenerating with a more recent Bison would > probably address the issue. > > But I sense you are referring to something different. I really meant compiler errors, not warnings. I could not tell you the details of these issues right now, as I often don't get detailed information about the precise circumstances that lead to these compilation errors (e.g. precise versions of compiler, flex, bison, ... probably any source changes who knows). I usually also don't ask though, because the fix is so easy: regenerate it. Best regards, Christian Schoenebeck

Re: how to get left hand side symbol in action

2020-06-09 Thread Christian Schoenebeck
On Dienstag, 9. Juni 2020 07:58:56 CEST Akim Demaille wrote: > Hi Christian, > > > Le 8 juin 2020 à 13:32, Christian Schoenebeck > > a écrit :> > > On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote: > >> YYTERROR was not a documented feature. I'

Re: how to get left hand side symbol in action

2020-06-08 Thread Christian Schoenebeck
On Montag, 8. Juni 2020 07:46:27 CEST Akim Demaille wrote: > Hi Christian, > > CC'd to help-bison FTR. > > > Le 7 juin 2020 à 18:17, Christian Schoenebeck > > a écrit : > > > > Hi Akim, > > > > I just realized that you removed YYTERROR f

Re: how to get left hand side symbol in action

2019-12-31 Thread Christian Schoenebeck
accessing yytname[] directly with custom code on top of skeletons is currently the only way to achieve the features we discussed in this thread. > Cheers, and best wishes for 2020! Yep, all the best and see you in 2020! Best regards, Christian Schoenebeck

Re: Bison 3.5 released [stable]

2019-12-13 Thread Christian Schoenebeck
Because character literal sequences are indeed commonly used to handle scanner tasks on parser side and I haven't seen issues with the latter in years. Best regards, Christian Schoenebeck

Re: Further C++ operators for position

2019-11-04 Thread Christian Schoenebeck
ons always as spans (first_line, first_column, last_line, last_column). Best regards, Christian Schoenebeck

Re: how to get left hand side symbol in action

2019-05-20 Thread Christian Schoenebeck
you find it an appropriate time. Thanks Akim! Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: how to get left hand side symbol in action

2019-05-11 Thread Christian Schoenebeck
On Freitag, 10. Mai 2019 19:43:03 CEST Akim Demaille wrote: > > Le 10 mai 2019 à 16:28, Christian Schoenebeck > > a écrit :> > > On Freitag, 10. Mai 2019 06:57:00 CEST Derek Clegg wrote: > >> In fact, I do not think error messages in the generated parser should be

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
eatment. But > handing them as strings used as keys in some container would be a useless > cost compared to an enum. Enums would be more clean of course (even though string comparisons are cheap nowadays). But there should still be an easy way IMO to convert that enum into a string representation. Otherwise developers would always need to write tables manually for doing these enum -> string conversions. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
se being honest, probably everybody has a completely different opinion about how an appropriate representation of an error message in a final software release should look like exactly. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https:

Re: how to get left hand side symbol in action

2019-05-10 Thread Christian Schoenebeck
> | ^ > > looks stupid; "char", "identifier" and "" should be translated. Well, my point was that translation is trivial. An average developer is certainly able to solve required translation tasks very easily by custom code if required. The other aspects though, looking ahead on a parser states with custom code is not trivial. So my point was: on doubt it might make sense to concentrate on the mandatory aspect of providing access to the raw symbol names and ignoring the translation aspects for now. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: how to get left hand side symbol in action

2019-05-09 Thread Christian Schoenebeck
scussed here is that it is currently not trivial to achieve them with own, custom code. You do need to have a profound knowledge of how the internal skeleton algorithm works to be able to extra polate the missing information by custom code on top of it. Best regards, Christian Schoenebeck __

Re: Not able to use %union?

2019-02-18 Thread Christian Schoenebeck
On Montag, 18. Februar 2019 12:22:27 CET Christian Schoenebeck wrote: > On Sonntag, 17. Februar 2019 21:37:26 CET Peng Yu wrote: > > Because I want to use the previously allocated memory, I don't want to > > call "rs_init(&yylval->str)" in any action. So YYST

Re: Not able to use %union?

2019-02-18 Thread Christian Schoenebeck
ce between struct or union is handled by the C/C++ compiler, not by Bison. Any reason that you don't want to use C++ and e.g. std::string instead of your pure C and garbage collector solution? Best regards, Christian Schoenebeck ___ help-bison@g

Re: Why token are numbered from 258?

2019-02-07 Thread Christian Schoenebeck
string "error", and for 257 the string "$undefined". Likewise you can do the same for your own tokens. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: Why token are numbered from 258?

2019-02-07 Thread Christian Schoenebeck
ilt-in terminals YYEOF and YYEMPTY. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: Forcing Bison's yacc.c to report more expected tokens on syntax error

2019-02-07 Thread Christian Schoenebeck
. In such a scenario, if you were limited to only resolve the very next token, you would only be able to show the user a list of single character(s) expected next, like "expected either 'a', 'g', 'c'" instead of showing the user e.g. "expected either 

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Christian Schoenebeck
GPLv3 Bison version ... well you get the idea. And this issue is not just limited to meta compilers. There are many other non obvious use cases where you might theoretically get into the same situation. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-26 Thread Christian Schoenebeck
is is not a parser generator. Well, it was obviously not your intention. But now consider somebody uses that conversion tool for converting a parser originally written in programming language A to language B. Right, your Bison generated conversion tool

Re: [Question]:Question about bison adding GPL copyright to the parser files generated by bison and yacc.c

2019-01-22 Thread Christian Schoenebeck
no, in that case the GPL automatically applies to your generated parser file as well. Note that the pure potential of your generated parser to be capable of generating another parser would be sufficient for the GPL to apply! Best regards, Christian Schoenebeck _

Re: No Bison 3 in untainted macOS installs

2018-12-15 Thread Christian Schoenebeck
ur choice, so long as that work isn't itself a parser generator using the skeleton ..." Considering the amount of tools Apple has which in turn create new intermediate source files, I can imagine why they fear ending up with GPL3 issues was too dangerous. Best regards, Chr

Re: Interactive continuation prompting

2014-06-29 Thread Christian Schoenebeck
how to design and implement it, and you think you can already identify negative consequences? I think you are probably too focused at Bison's current design if you really think that your negative expectations above would be true. > I hope Bison cont

Re: Interactive continuation prompting

2014-06-28 Thread Christian Schoenebeck
On Friday 27 June 2014 18:12:34 Hans Aberg wrote: > On 27 Jun 2014, at 14:40, Christian Schoenebeck wrote: > > 1. Strong separation between "lexer" and "parser" has its historical > > > >reasons, but it makes things often quite problemati

Re: Interactive continuation prompting

2014-06-27 Thread Christian Schoenebeck
of tables), instead of providing convenient and detailed access to the higher level informations of the parse states, i.e. for the tasks you described. Being able to access those informations conveniently at runtime, is far more important today than s

Re: Can I nest compilation of files?

2014-03-15 Thread Christian Schoenebeck
he original process had when it called fork(). So that's probably easier than what you were trying to achieve by dealing with environment variables. That's a very basic programming question though, not really related to Bison. Best regards, Christian Schoenebeck _

Re: sticking custom meta informations to grammar rules

2014-02-10 Thread Christian Schoenebeck
On Thursday 30 January 2014 19:11:11 Hans Aberg wrote: > On 30 Jan 2014, at 17:55, Christian Schoenebeck wrote: > > On Thursday 30 January 2014 18:03:28 Hans Aberg wrote: > >> I recall some others in the past that have written on interactive > >> parsers showing c

Re: Problem with infinite loop

2014-02-10 Thread Christian Schoenebeck
(i.e. all actions and all custom lexer/parser code you might have in place)? Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: yprhs, yyrhs & Bison 3

2014-02-07 Thread Christian Schoenebeck
On Friday 07 February 2014 16:43:00 Christian Schoenebeck wrote: > I noticed that tables yyprhs[] and yyrhs[] are not generated by default > anymore since Bison 3. I tried adding "%debug" and also tried "%define > parse.trace", but that did not bring them ba

yprhs, yyrhs & Bison 3

2014-02-07 Thread Christian Schoenebeck
Hi! I noticed that tables yyprhs[] and yyrhs[] are not generated by default anymore since Bison 3. I tried adding "%debug" and also tried "%define parse.trace", but that did not bring them back. How can those 2 tables be generated by Bison 3 now? Best regards, C

Re: sticking custom meta informations to grammar rules

2014-01-30 Thread Christian Schoenebeck
-) So I am estimating this risk to be low in the mid or even long term. And of course minor things change, like defines etc., but that's trivial to maintain when new Bison versions are released. Best regards, Christian Schoenebeck ___ help-b

Re: sticking custom meta informations to grammar rules

2014-01-30 Thread Christian Schoenebeck
generated yyfoo tables) to break with future Bison versions that soon. Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

sticking custom meta informations to grammar rules

2014-01-29 Thread Christian Schoenebeck
m trying to get at. ;-) Is there already some kind of solution for that in Bison? Or does anybody know a work around to achieve something like that? Best regards, Christian Schoenebeck ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: improving yysyntax_error()

2007-06-21 Thread Christian Schoenebeck
Es geschah am Thursday, 21. June 2007 20:18 als Hans Aberg schrieb: > How should %atomic be implemented? How it "should" be implemented is the wrong question, or at least addressed to the wrong person, since I'm not familiar enough with the bison implementation yet. That was actually my main rea

Re: improving yysyntax_error()

2007-06-21 Thread Christian Schoenebeck
Es geschah am Thursday, 21. June 2007 22:15 als Hans Aberg schrieb: > > How it "should" be implemented is the wrong question, or at least > > addressed to > > the wrong person, since I'm not familiar enough with the bison > > implementation > > yet. That was actually my main reason to write to this

Re: improving yysyntax_error()

2007-06-21 Thread Christian Schoenebeck
Es geschah am Thursday, 21. June 2007 20:18 als Hans Aberg schrieb: > How should %atomic be implemented? How it "should" be implemented is the wrong question, or at least addressed to the wrong person, since I'm not familiar enough with the bison implementation yet. That was actually my main rea

Re: improving yysyntax_error()

2007-06-21 Thread Christian Schoenebeck
Es geschah am Thursday, 21. June 2007 16:08 als Hans Aberg schrieb: > No, in this model, the lexer matches patterns as usual, only when the > match has been made, returns the multibyte character byte by byte. Doesn't make a difference. The problem for the UTF-8 part is still the same, no matter i

Re: improving yysyntax_error()

2007-06-21 Thread Christian Schoenebeck
Es geschah am Thursday, 21. June 2007 13:12 als Hans Aberg schrieb: > On the one hand, you try to use Bison for something it wasn't > designed for, so unless to can come up with good motivations, getting > the change is unlikely to happen. Depends on which motivation you mean. A motivation for doi

improving yysyntax_error()

2007-06-20 Thread Christian Schoenebeck
Hi! I would like to improve the quality of error messages produced by yysyntax_error(). I know the theory behind LALR(1) parsers, but unfortunately I'm not very used to the bison skeleton parser implementation yet, so I hope you can help me a bit. First the reason: I'm strictly opposed to havi