TAILIEUCHUNG - compilers principles techniques and tools phần 3

Mục đích sử dụng của cấu trúc của hình. 3,66 là làm cho các mảng bằng cách lợi dụng sự giống nhau giữa các quốc gia tiếp theo kiểm tra. Ví dụ, nhà nước t, mặc định cho nhà nước s, có thể là nhà nước nói rằng "chúng tôi đang làm việc trên một định danh," | Simpo PDF Merge and Split Unregistered Version - http is valid and the next state for state s on input a is next l . If check l Ạ s then we determine another state t defaults and repeat the process as if t were the current state. More formally the function nextstate is defined as follows int nextState s a if check base s -Ị- a s return next base s a else return nextState default s a The intended use of the structure of Fig. is to make the next-check arrays short by taking advantage of the similarities among states. For instance state t the default for state s might be the state that says we are working on an identifier like state 10 in Fig. . Perhaps state s is entered after seeing the letters th which are a prefix of keyword then as well as potentially being the prefix of some lexeme for an identifier. On input character e we must go from state s to a special state that remembers we have seen the but otherwise state s behaves as t does. Thus we set check base s e to s to confirm that this entry is valid for s and we set next base s e to the state that remembers the. Also default s is set to t. While we may not be able to choose base values so that no next-check entries remain unused experience has shown that the simple strategy of assigning base values to states in turn and assigning each 6ase s value the lowest integer so that the special entries for state s are not previously occupied utilizes little more space than the minimum possible. Exercises for Section Exercise Extend the table of Fig. to include the operators a and b . Exercise Use Algorithm to convert the regular expressions of Exercise directly to deterministic finite automata. Exercise We can prove that two regular expressions are equivalent by showing that their minimum-state DFA s are the same up to renaming of states. Show in this way that the following regular expressions a b a b and e a b are all equivalent. Note You may have .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.