Re: Best language for implementing compilers?

Kaz Kylheku <157-073-9834@kylheku.com>
Sun, 10 Mar 2019 05:48:27 +0000 (UTC)

          From comp.compilers

Related articles
[13 earlier articles]
Re: Best language for implementing compilers? mertesthomas@gmail.com (2019-03-09)
Re: Best language for implementing compilers? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-03-09)
Re: Best language for implementing compilers? bc@freeuk.com (Bart) (2019-03-09)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-09)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-09)
Re: Best language for implementing compilers? 157-073-9834@kylheku.com (Kaz Kylheku) (2019-03-10)
Re: Best language for implementing compilers? 157-073-9834@kylheku.com (Kaz Kylheku) (2019-03-10)
Re: Best language for implementing compilers? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2019-03-10)
Re: Best language for implementing compilers? bc@freeuk.com (Bart) (2019-03-10)
Re: Best language for implementing compilers? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-03-10)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-10)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-10)
Re: Best language for implementing compilers? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2019-03-11)
[4 later articles]
| List of all articles for this month |

From: Kaz Kylheku <157-073-9834@kylheku.com>
Newsgroups: comp.compilers
Date: Sun, 10 Mar 2019 05:48:27 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 19-02-002 19-02-004 19-02-006 19-03-002 19-03-006
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="48234"; mail-complaints-to="abuse@iecc.com"
Keywords: parse
Posted-Date: 10 Mar 2019 01:02:32 EST

On 2019-03-10, George Neuner <gneuner2@comcast.net> wrote:
> On Sat, 9 Mar 2019 01:47:38 -0500 (EST), mertesthomas@gmail.com wrote:
>
>>For parsing I don't think that pattern matching leads to correct
>>results in all cases. I have seen too much buggy attempts to do
>>parsing with pattern matching.
>
> You have seen the approach of bad patterns - you have not seen that
> patterns are a bad approach.
>
> I also have seen some poor attempts made using pattern matching - when
> the patterns are too general, or don't cover 100% the intended cases -
> there will be unintended matches. Pattern matching is only as


Sometimes unintended matches are better; you can deal with the
over-match easily later in the pipeline.


Lisp is a good example: any possible tree shape, containing any symbols,
can be scanned into a tree. Then macros and operators check for invalid
syntax.


In C, any combination of type specifiers and qualifiers can occur in a
declaration. For instance the simple grammar will match
"long char unsigned short int double".


Enforcing the permissible combinations is a constraint check.


The valid combinations can occur in any order: unsigned long int, int
long unsigned, ...


It would be a fool's errand to write phrase structure rules to match the
valid combinations and not match invalid ones.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.