OnlineWoerterBuecher.de
Internes

Lexikon


context clash


When a href="module.php?name=Lexikon&file=search&eid=1&query=parser">parser cannot tell which alternative href="module.php?name=Lexikon&file=search&eid=1&query=production">production of a href="module.php?name=Lexikon&file=search&eid=1&query=syntax">syntax applies by looking at the next input href="module.php?name=Lexikon&file=search&eid=1&query=token">token ("lexeme"). E.g. given syntax C -> A | b c A -> d | b e If you' re parsing non-terminal C and the next token is ' b' , you don' t know whether it' s the first or second alternative of C since they both can start with b. To discover whether a grammar has a context clash: For each non-terminal, N, with multiple alternatives, look at the first symbol of each alternative' s right-hand side, call it s. If s is the empty string, then find the set FOLLOWER(N) otherwise find the set FIRST*(s). If any of the sets for N' s alternatives intersect then there will be a context clash when parsing N. If the next input symbol is one of those in the intersection of two sets then you won' t know which of the alternatives applies. FIRST(s) is the set of symbols with which s can start, including s itself. If s is a non-terminal then FIRST(s) also includes the first symbol of each alternative right-hand side of s. The ' *' in FIRST*(s) means the "href="module.php?name=Lexikon&file=search&eid=1&query=transitive closure">transitive closure" of FIRST which means keep applying FIRST to each element of the result until the result doesn' t change. I.e. start with just the set R = href="module.php?name=Lexikon&file=search&eid=1&query=s">s, then for each non-terminal x in R, add FIRST(x) to R. Keep doing this until nothing new is added. (We are really only interested in the terminals in FIRST*(s) but some definitions include the non-terminals). FOLLOWER(N) is the set of symbols which can come after N in a sentence. Find each occurrence of N on the right-hand side of a rule, e.g. M -> ... | ... N ... | ... If there is a symbol s immediately following N then add FIRST*(s) to the result (again, we' re only interested in the terminal symbols in FIRST*(s)) if there is no symbol after N in the alternative then add FOLLOWER(M) to the result (i.e. if N can be the last symbol in an M then anything that can follow M can also follow N). If a grammar can generate the same sentence in multiple different ways (with different parse tress) then it is ambiguous. An ambiguity must start with a context clash (but not all context clashes imply ambiguity). The context clash occurs when trying to parse the first token of the phrase with multiple parses - you will not be able to tell which alternative to take. To see if a context clash is also a case of ambiguity you would need to follow the alternatives involved in each context clash to see if they can generate the same complete sequence of tokens. (1995-04-05)

In addition suitable contents:
[ href="module.php?name=Lexikon&op=content&tid=134">= ] [ href="module.php?name=Lexikon&op=content&tid=262">ad ] [ href="module.php?name=Lexikon&op=content&tid=383">af ] [ href="module.php?name=Lexikon&op=content&tid=396">ag ] [ href="module.php?name=Lexikon&op=content&tid=411">ai ] [ href="module.php?name=Lexikon&op=content&tid=433">al ] [ href="module.php?name=Lexikon&op=content&tid=531">alt ] [ href="module.php?name=Lexikon&op=content&tid=544">am ] [ href="module.php?name=Lexikon&op=content&tid=592">an ] [ href="module.php?name=Lexikon&op=content&tid=683">app ] [ href="module.php?name=Lexikon&op=content&tid=740">ar ] [ href="module.php?name=Lexikon&op=content&tid=743">arc ] [ href="module.php?name=Lexikon&op=content&tid=800">as ] [ href="module.php?name=Lexikon&op=content&tid=822">ash ] [ href="module.php?name=Lexikon&op=content&tid=894">at ] [ href="module.php?name=Lexikon&op=content&tid=1026">b ] [ href="module.php?name=Lexikon&op=content&tid=1181">be ] [ href="module.php?name=Lexikon&op=content&tid=1269">bi ] [ href="module.php?name=Lexikon&op=content&tid=1444">bo ] [ href="module.php?name=Lexikon&op=content&tid=1501">bot ] [ href="module.php?name=Lexikon&op=content&tid=1695">by ] [ href="module.php?name=Lexikon&op=content&tid=1708">C ] [ href="module.php?name=Lexikon&op=content&tid=1724">ca ] [ href="module.php?name=Lexikon&op=content&tid=1844">case ] [ href="module.php?name=Lexikon&op=content&tid=1896">cc ] [ href="module.php?name=Lexikon&op=content&tid=2001">ch ] [ href="module.php?name=Lexikon&op=content&tid=2138">cl ] [ href="module.php?name=Lexikon&op=content&tid=2199">closure ] [ href="module.php?name=Lexikon&op=content&tid=2247">co ] [ href="module.php?name=Lexikon&op=content&tid=2330">com ] [ href="module.php?name=Lexikon&op=content&tid=2441">complete ] [ href="module.php?name=Lexikon&op=content&tid=2545">con ] [ href="module.php?name=Lexikon&op=content&tid=2639">context ] [ href="module.php?name=Lexikon&op=content&tid=2900">cu ] [ href="module.php?name=Lexikon&op=content&tid=3136">dd ] [ href="module.php?name=Lexikon&op=content&tid=3151">de ] [ href="module.php?name=Lexikon&op=content&tid=3371">diff ] [ href="module.php?name=Lexikon&op=content&tid=3436">ding ] [ href="module.php?name=Lexikon&op=content&tid=3470">disc ] [ href="module.php?name=Lexikon&op=content&tid=3565">do ] [ href="module.php?name=Lexikon&op=content&tid=3752">du ] [ href="module.php?name=Lexikon&op=content&tid=3834">E ] [ href="module.php?name=Lexikon&op=content&tid=3865">ec ] [ href="module.php?name=Lexikon&op=content&tid=3896">ed ] [ href="module.php?name=Lexikon&op=content&tid=3929">ee ] [ href="module.php?name=Lexikon&op=content&tid=4008">element ] [ href="module.php?name=Lexikon&op=content&tid=4147">ER ] [ href="module.php?name=Lexikon&op=content&tid=4148">er ] [ href="module.php?name=Lexikon&op=content&tid=4150">era ] [ href="module.php?name=Lexikon&op=content&tid=4171">es ] [ href="module.php?name=Lexikon&op=content&tid=4199">et ] [ href="module.php?name=Lexikon&op=content&tid=4497">fi ] [ href="module.php?name=Lexikon&op=content&tid=4520">file ] [ href="module.php?name=Lexikon&op=content&tid=4569">FIR ] [ href="module.php?name=Lexikon&op=content&tid=4700">fo ] [ href="module.php?name=Lexikon&op=content&tid=4727">for ] [ href="module.php?name=Lexikon&op=content&tid=4989">ga ] [ href="module.php?name=Lexikon&op=content&tid=5057">ge ] [ href="module.php?name=Lexikon&op=content&tid=5070">gen ] [ href="module.php?name=Lexikon&op=content&tid=5089">generate ] [ href="module.php?name=Lexikon&op=content&tid=5134">gh ] [ href="module.php?name=Lexikon&op=content&tid=5141">gi ] [ href="module.php?name=Lexikon&op=content&tid=5291">gr ] [ href="module.php?name=Lexikon&op=content&tid=5300">grammar ] [ href="module.php?name=Lexikon&op=content&tid=5403">gu ] [ href="module.php?name=Lexikon&op=content&tid=5434">h ] [ href="module.php?name=Lexikon&op=content&tid=5493">hang ] [ href="module.php?name=Lexikon&op=content&tid=5540">hat ] [ href="module.php?name=Lexikon&op=content&tid=5656">hing ] [ href="module.php?name=Lexikon&op=content&tid=5722">hose ] [ href="module.php?name=Lexikon&op=content&tid=5768">hr ] [ href="module.php?name=Lexikon&op=content&tid=5779">ht ] [ href="module.php?name=Lexikon&op=content&tid=5931">id ] [ href="module.php?name=Lexikon&op=content&tid=5956">ie ] [ href="module.php?name=Lexikon&op=content&tid=5986">iff ] [ href="module.php?name=Lexikon&op=content&tid=6013">il ] [ href="module.php?name=Lexikon&op=content&tid=6064">in ] [ href="module.php?name=Lexikon&op=content&tid=6068">inc ] [ href="module.php?name=Lexikon&op=content&tid=6070">include ] [ href="module.php?name=Lexikon&op=content&tid=6165">input ] [ href="module.php?name=Lexikon&op=content&tid=6194">int ] [ href="module.php?name=Lexikon&op=content&tid=6413">io ] [ href="module.php?name=Lexikon&op=content&tid=6448">IR ] [ href="module.php?name=Lexikon&op=content&tid=6449">ir ] [ href="module.php?name=Lexikon&op=content&tid=6482">is ] [ href="module.php?name=Lexikon&op=content&tid=6558">it ] [ href="module.php?name=Lexikon&op=content&tid=6760">K ] [ href="module.php?name=Lexikon&op=content&tid=6789">ke ] [ href="module.php?name=Lexikon&op=content&tid=6792">ken ] [ href="module.php?name=Lexikon&op=content&tid=6822">ki ] [ href="module.php?name=Lexikon&op=content&tid=6861">kn ] [ href="module.php?name=Lexikon&op=content&tid=6918">la ] [ href="module.php?name=Lexikon&op=content&tid=7023">ld ] [ href="module.php?name=Lexikon&op=content&tid=7091">Lex ] [ href="module.php?name=Lexikon&op=content&tid=7092">lexeme ] [ href="module.php?name=Lexikon&op=content&tid=7107">li ] [ href="module.php?name=Lexikon&op=content&tid=7245">LL ] [ href="module.php?name=Lexikon&op=content&tid=7258">LO ] [ href="module.php?name=Lexikon&op=content&tid=7399">ls ] [ href="module.php?name=Lexikon&op=content&tid=7410">lt ] [ href="module.php?name=Lexikon&op=content&tid=7415">lu ] [ href="module.php?name=Lexikon&op=content&tid=7437">lv ] [ href="module.php?name=Lexikon&op=content&tid=7441">ly ] [ href="module.php?name=Lexikon&op=content&tid=7457">M ] [ href="module.php?name=Lexikon&op=content&tid=7463">ma ] [ href="module.php?name=Lexikon&op=content&tid=8019">mm ] [ href="module.php?name=Lexikon&op=content&tid=8032">mo ] [ href="module.php?name=Lexikon&op=content&tid=8040">mod ] [ href="module.php?name=Lexikon&op=content&tid=8079">module ] [ href="module.php?name=Lexikon&op=content&tid=8167">mp ] [ href="module.php?name=Lexikon&op=content&tid=8258">mu ] [ href="module.php?name=Lexikon&op=content&tid=8384">N ] [ href="module.php?name=Lexikon&op=content&tid=8386">na ] [ href="module.php?name=Lexikon&op=content&tid=8460">nc ] [ href="module.php?name=Lexikon&op=content&tid=8472">ne ] [ href="module.php?name=Lexikon&op=content&tid=8627">ng ] [ href="module.php?name=Lexikon&op=content&tid=8630">ni ] [ href="module.php?name=Lexikon&op=content&tid=8660">nl ] [ href="module.php?name=Lexikon&op=content&tid=8672">nn ] [ href="module.php?name=Lexikon&op=content&tid=8675">no ] [ href="module.php?name=Lexikon&op=content&tid=8745">np ] [ href="module.php?name=Lexikon&op=content&tid=8760">ns ] [ href="module.php?name=Lexikon&op=content&tid=8820">O ] [ href="module.php?name=Lexikon&op=content&tid=8964">om ] [ href="module.php?name=Lexikon&op=content&tid=9204">pa ] [ href="module.php?name=Lexikon&op=content&tid=9325">parser ] [ href="module.php?name=Lexikon&op=content&tid=9327">parsing ] [ href="module.php?name=Lexikon&op=content&tid=9550">ph ] [ href="module.php?name=Lexikon&op=content&tid=9651">pl ] [ href="module.php?name=Lexikon&op=content&tid=9738">ply ] [ href="module.php?name=Lexikon&op=content&tid=9908">pr ] [ href="module.php?name=Lexikon&op=content&tid=10012">product ] [ href="module.php?name=Lexikon&op=content&tid=10144">pt ] [ href="module.php?name=Lexikon&op=content&tid=10253">query ] [ href="module.php?name=Lexikon&op=content&tid=10364">rc ] [ href="module.php?name=Lexikon&op=content&tid=10385">re ] [ href="module.php?name=Lexikon&op=content&tid=10390">real ] [ href="module.php?name=Lexikon&op=content&tid=10767">ro ] [ href="module.php?name=Lexikon&op=content&tid=10837">RS ] [ href="module.php?name=Lexikon&op=content&tid=10887">ru ] [ href="module.php?name=Lexikon&op=content&tid=10914">rw ] [ href="module.php?name=Lexikon&op=content&tid=10918">S ] [ href="module.php?name=Lexikon&op=content&tid=10922">sa ] [ href="module.php?name=Lexikon&op=content&tid=10959">sam ] [ href="module.php?name=Lexikon&op=content&tid=11010">sc ] [ href="module.php?name=Lexikon&op=content&tid=11150">se ] [ href="module.php?name=Lexikon&op=content&tid=11229">sentence ] [ href="module.php?name=Lexikon&op=content&tid=11281">set ] [ href="module.php?name=Lexikon&op=content&tid=11314">sh ] [ href="module.php?name=Lexikon&op=content&tid=11376">si ] [ href="module.php?name=Lexikon&op=content&tid=11506">sit ] [ href="module.php?name=Lexikon&op=content&tid=11615">sn ] [ href="module.php?name=Lexikon&op=content&tid=11651">so ] [ href="module.php?name=Lexikon&op=content&tid=11934">st ] [ href="module.php?name=Lexikon&op=content&tid=12093">string ] [ href="module.php?name=Lexikon&op=content&tid=12133">su ] [ href="module.php?name=Lexikon&op=content&tid=12246">sy ] [ href="module.php?name=Lexikon&op=content&tid=12295">syntax ] [ href="module.php?name=Lexikon&op=content&tid=12359">T ] [ href="module.php?name=Lexikon&op=content&tid=12416">tar ] [ href="module.php?name=Lexikon&op=content&tid=12533">terminal ] [ href="module.php?name=Lexikon&op=content&tid=12567">text ] [ href="module.php?name=Lexikon&op=content&tid=12588">th ] [ href="module.php?name=Lexikon&op=content&tid=12721">to ] [ href="module.php?name=Lexikon&op=content&tid=12730">token ] [ href="module.php?name=Lexikon&op=content&tid=12787">tr ] [ href="module.php?name=Lexikon&op=content&tid=12819">transitive ] [ href="module.php?name=Lexikon&op=content&tid=12820">transitive closure ] [ href="module.php?name=Lexikon&op=content&tid=12939">tw ] [ href="module.php?name=Lexikon&op=content&tid=13175">us ] [ href="module.php?name=Lexikon&op=content&tid=13310">ve ] [ href="module.php?name=Lexikon&op=content&tid=13626">WE ] [ href="module.php?name=Lexikon&op=content&tid=13725">win ] [ href="module.php?name=Lexikon&op=content&tid=14075">yt ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (7628 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.1038 Seconds, with 17 Database-Queries
Zurück zur Startseite