CONTEXT CLASH

  

Copyright © Philip M. Parker, INSEAD. Terms of Use.

CONTEXT CLASH

Specialty Definition: CONTEXT CLASH

DomainDefinition

Computing

Context clash When a parser cannot tell which alternative production of a syntax applies by looking at the next input 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 "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 = 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). Source: The Free On-line Dictionary of Computing.

Source: compiled by the editor from various references; see credits.

Top     

Anagrams: CONTEXT CLASH

Scrabble® Enable2K-Verified Anagrams

Words within the letters "a-c-c-e-h-l-n-o-s-t-t-x"

-3 letters: catechols, stonechat.

-4 letters: anethols, calottes, catechol, cathects, chalones, chancels, chattels, cholates, cholents, cochleas, coenacts, conceals, contacts, contexts, cosecant, eschalot, etchants, ethanols, lactones, latchets.

-5 letters: accents, anethol, cachets, calotte, cancels, cantles, catches, cathect, centals, chalets, chalone, chancel, chances, chasten, chattel, cholate, cholent, claxons, cloches, clothes, coaches, cochlea, coenact, conceal, conchae, conchal, conches, contact, contest.

Source: compiled by the editor from various references; see credits.

SCRABBLE® is a registered trademark. All intellectual property rights in and to the game are owned in the U.S.A and Canada by Hasbro Inc., and throughout the rest of the world by J.W. Spear & Sons Limited of Maidenhead, Berkshire, England, a subsidiary of Mattel Inc. Mattel and Spear are not affiliated with Hasbro.

Top     

Alternative Orthography: CONTEXT CLASH


Hexadecimal (or equivalents, 770AD-1900s) (references)

43 4F 4E 54 45 58 54      43 4C 41 53 48

Leonardo da Vinci (1452-1519; backwards) (references)

    

Binary Code (1918-1938, probably earlier) (references)

01000011 01001111 01001110 01010100 01000101 01011000 01010100 00100000 01000011 01001100 01000001 01010011 01001000

HTML Code (1990) (references)

&#67 &#79 &#78 &#84 &#69 &#88 &#84 &#32 &#67 &#76 &#65 &#83 &#72

ISO 10646 (1991-1993) (references)

0043 004F 004E 0054 0045 0058 0054      0043 004C 0041 0053 0048

Encryption (beginner's substitution cypher): (references)

3749485439585423746355342

Top     



INDEX

1. Anagrams
2. Orthography
3. Bibliography


  

Copyright © Philip M. Parker, INSEAD. Terms of Use.