Liste des Groupes | Revenir à theory |
Mikko <mikko.levanto@iki.fi> wrote:Yes if "ordinary" is defined as one that can only parse a regularOn 2025-03-19 11:02:49 +0000, Alan Mackenzie said:Mikko <mikko.levanto@iki.fi> wrote:On 2025-03-18 14:08:50 +0000, Mr Flibble said:On Tue, 18 Mar 2025 15:59:45 +0200, Mikko wrote:[ .... ]Is there a neosBNF schema that describes the tokens of FORtRAN 66 or
Algol 60?Not yet.The definition of string literal of Algol 60 would be a good example
of something that cannot be defined with a regular expression and is
therefore impossible or at least complicated with an ordinary tokenizer.Would you please be more specific about just what in an Algol 60 string
literal prevents a regexp from parsing it. Not for any special reason,
just that I'm curious. Maybe an example of such a string would be
interesting. Thanks!Algol 60 has different characters for opening and closing quotes (somethingMost current languages, including C, have different openers and closers
like 2018 and 2019 of Unicode) ....
for comments, which is surely analogous.
.... and allows any number of nested quotes.Ah OK. Regular expressions can't parse arbitrarily nested structures.
But Backus-Nauer Form can express them, and a push-down automaton can
process them.
Are you sure about ordinary tokenizers not being able to handle such
arbitrarily nested things in a non-complicated way?
Les messages affichés proviennent d'usenet.