Lojban
The Logical Language
Log in
Username:
Password:
I forgot my password |
CapsLock is on.
Log in
History: context free grammars
View page
Collapse Into Edit Sessions
Source of version: 2
(current)
«
»
A grammar which rules do not depend on the context during parsing. I know, this is a circular definition. Here are some examples : * Lojban's grammar, and more generally any ((LR)) or ((LL)) grammar, are context-free. * The C language is supposed to be context-free, except on the topic of type definition (if "typedef" preceeds a definition, the symbol defined becomes a type rather than a variable : semantics change depending on the context, given the same lexical grammar). ** C is fairly good about it, compared to many other languages. * English is not context-free. The way we parse/understand sentences depends on the context, either past or future. Consider this text : you if sense makes sentence this, please read the first six words backwards. *''mi'e cein. Doesn't Lojban have si/sa/su, which must be "understood" by the parser in the same sense as the English example above in order to be correctly parsed?'' ** maybe this doesn't address what you mean -- but si/sa/su can be implemented below actual language parsing, simsa things such as \ line continuations in C. ** they are trivially handled by the lexer. *But this sentence isn't legitimate English... ** arguable; but the point still stands -- english isn't context free. A phrase structure grammar for english would be hideously large and type 0-1, if a complete one were ever made, which is unlikely. --mi'e .djorden. ---- I thought a CFG was one where the left side of the rewrite rule is unconditional. E.g. "A -> B C" is context free, but "A -> B C, when A is preceded by D" ("D A -> B C") is not context free. --((And)) Fairly sure that is the case. It would certainly be context. --((Jay Kominek|jay)) the above is correct -- a context free grammar may only have one non terminal on the left hand side of its rules. --mi'e .djorden.
History
Enable pagination
rows per page
HTML diff
Side-by-side diff
Side-by-side diff by characters
Inline diff
Inline diff by characters
Full side-by-side diff
Full side-by-side diff by characters
Full inline diff
Full inline diff by characters
Unified diff
Side-by-side view
HTML diff
Side-by-side diff
Advanced
Information
Version
Tue 10 of Jun, 2014 04:21 GMT
mukti
from 68.173.146.212
2
Fri 30 of Nov, 2001 12:31 GMT
admin
from admin
created from phpwiki import
1
Select action to perform with checked...
Remove
OK
About
Introduction
What Others Say
FAQ
Learning
Books
Vocabulary
Lojbanic Software
Community
Web/Email Forums
IRC Chat
Links
News
Dictionary
Swag
Multimedia
Lojbanic Texts
Audio
Wiki
Recent Changes
Popular Pages
How To Edit
The LLG
Official Projects
Publications
Donate!
Contact Us
Search Lojban Resources