Related articles |
---|
Can syntax be enough? No need of semantics. sinu.nayak2001@gmail.com (Srinu) (2009-09-13) |
Re: Can syntax be enough? No need of semantics. quinn_jackson2004@yahoo.ca (Quinn Tyler Jackson) (2009-09-18) |
Re: Can syntax be enough? No need of semantics. news@cuboid.co.uk (Andy Walker) (2009-09-18) |
Re: Can syntax be enough? No need of semantics. anton@mips.complang.tuwien.ac.at (2009-09-18) |
Re: Can syntax be enough? No need of semantics. news@cuboid.co.uk (Andy Walker) (2009-09-19) |
Re: Can syntax be enough? No need of semantics. dot@dotat.at (Tony Finch) (2009-09-21) |
Re: Can syntax be enough? No need of semantics. torbenm@pc-003.diku.dk (2009-09-23) |
Re: Can syntax be enough? No need of semantics. gopi.onthemove@gmail.com (gopi) (2009-09-24) |
Re: Can syntax be enough? No need of semantics. gopi.onthemove@gmail.com (gopi) (2009-09-24) |
Re: Can syntax be enough? No need of semantics. sinu.nayak2001@gmail.com (Srinu) (2009-09-29) |
From: | gopi <gopi.onthemove@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Thu, 24 Sep 2009 21:15:52 -0700 (PDT) |
Organization: | Compilers Central |
References: | 09-09-062 |
Keywords: | parse, theory |
Posted-Date: | 26 Sep 2009 08:32:46 EDT |
> Can we have a language/grammar, which doesn't need any semantics
> checking for it to be able to correctly interpreted by its compiler? I
> mean, if some statement of this language/grammar satisfies the syntax
> of the grammar, then it is a perfect statement and a compiler can
> perform right things according to what the statement specifies.
> Compiler shall not need semantics checking. Idea is to remove
> semantics checking phase from a compiler.
I would think the answer is yes (to some degree). If you see untyped
languages or dynamically typed languages, their grammars and parsers
are quite simple and need almost no semantic checking. Also, most
declarative languages (including XML to some extent) fall under this
category. Even functional languages like lisp can be parsed quite well
using a really simple grammar.
Of course many such languages shift the paradigm to do more checking
at run-time, which is more of an "existential" check than a "semantic"
one.
Having said that, the key point is -- is it possible to make mistakes
when creating a sentence / program ? Can those mistakes be identified
early on by the parser or compiler ? Compiler design with semantic
checking is addressing these issues. Eliminating the need for checking
semantics is not going to take away the mistakes.
Generally speaking a better solution is to try and automate the
generation of procedural / OO programs from higher level declarative
programs. This gives the twin benefits of reduced complexity while
reusing the capabilities of existing powerful languages for modeling
behavior / function. Meta-Model driven tools take this a step forward
eliminating the need for generating programs and directly work at
runtime with external model files.
Gopi Kumar Bulusu
Chief Executive Officer
Sankhya Technologies Private Limited
http://www.sankhya.com
India Mobile : +91 94408 78042
US (Voice-Mail) : (408) 556-9757
Skype : gopibulusu
India Office : +91 44 2822 7358
Return to the
comp.compilers page.
Search the
comp.compilers archives again.