OnlineWoerterBuecher.de
Internes

Lexikon


context clash


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






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (7615 Reads)

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

Page Generation in 0.091 Seconds, with 16 Database-Queries
Zurück zur Startseite