SU1418757A1 - Device for lexical analysis of programs - Google Patents

Device for lexical analysis of programs Download PDF

Info

Publication number
SU1418757A1
SU1418757A1 SU874197281A SU4197281A SU1418757A1 SU 1418757 A1 SU1418757 A1 SU 1418757A1 SU 874197281 A SU874197281 A SU 874197281A SU 4197281 A SU4197281 A SU 4197281A SU 1418757 A1 SU1418757 A1 SU 1418757A1
Authority
SU
USSR - Soviet Union
Prior art keywords
register
character
outputs
elements
input
Prior art date
Application number
SU874197281A
Other languages
Russian (ru)
Inventor
Владимир Степанович Фомичев
Геннадий Васильевич Разумовский
Андрей Измаилович Познянский
Николай Михайлович Сафъянников
Original Assignee
Ленинградский электротехнический институт им.В.И.Ульянова (Ленина)
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ленинградский электротехнический институт им.В.И.Ульянова (Ленина) filed Critical Ленинградский электротехнический институт им.В.И.Ульянова (Ленина)
Priority to SU874197281A priority Critical patent/SU1418757A1/en
Application granted granted Critical
Publication of SU1418757A1 publication Critical patent/SU1418757A1/en

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

Изобретение относитс  к вычислительной технике, предназначено дл  аппаратной поддержки процесса трансл ции и может быть использовано в специализированных процессорах или программно-аппаратных средствах, которые осуществл ют, перевод с  зыков программировани  высокого уровн  на машинный  зьж, а также в интерпретаторах  зыков программировани  высокого уровн . Цель изобретени  - расширение функциональных возможностей за счет обеспечени  лексического анализа в свободном формате и распознавание лексемы Символьна  строка, Дл  достижени  указанной цели в устройство , содержащее блок 1 преобразовани  кода Литер в код Лексем регистр 2, группу 3 элементов ИЛИ, группу 4, 5 элементов И, дополнительно введены дешифратор 12 символов и блок 13 управлени . 4 ют., 1 табл. SThe invention relates to computing technology, is intended for hardware support of the translation process, and can be used in specialized processors or software and hardware that carry out the translation from high-level programming languages to computer-based programming, as well as in high-level programming language interpreters. The purpose of the invention is the extension of functionality due to the provision of lexical analysis in a free format and recognition of a token. A character string. , a 12 character decoder and a control unit 13 are additionally introduced. 4 yut., 1 tab. S

Description

0000

&1 &one

VIVI

ttfttf

1 . Uone . U

, Изобретение относитс  к вычисли- I тельной Технике, предназначено дл  I аппаратной поддержки процессов транс л ции и может быть использовано в специализированных процессорах или программно-аппаратньт средствах, ко- торые осуществл ют перевод с  зыков пр.рграмт-шровани  высокого уровн  на машинный  зык, а также в интер- претаторах  зыков программировани  :высокого уровн , i . Цель изобретени  - расширение ;функциональных возможностей за счет обеспечени  лексического анализа ;программ на  зыках высокого уровн  IB свободном формате и распознавани The invention relates to computing technology, it is intended for I hardware support of translation processes and can be used in specialized processors or software and hardware means that perform translation from high-level programming languages to machine languages. , as well as in the interpreters of programming languages: high level, i. The purpose of the invention is to expand the functionality by providing lexical analysis, programs of high-level IB languages, free format and recognition

;лвксемы Символьна  строка , . . Сущность изобретени  состоит в создании устройства дл  лексического I анализа программ, способного вьщел т I типичные лексемы  зыков программиро- Iвани  высокого уровн -в свободном формате с использованием посимволь- 1.НОГО анализа текста программы дешиф- Оратором символов, определени  при помощи нее классд символов и распоз- навани  блоком управлени  на основа- нии этого класса лексических единиц.; Character string,. . The essence of the invention is to create a device for lexical program analysis that is capable of producing typical programming lexemes of high-level programming in a free format using the symbol of the program and decoding with it the class of characters and identifying the control unit on the basis of this class of lexical units.

На фиг о 1 представлена функционал на  схема устройства дл  лексического анализа программ; на фиг. 2 - фунциональна  схема примера реализации блока управлени , на фиг. 3 - микропрограмма § на фиг 4 - временна  диаграмма работы устройства.Fig. 1 shows the functionality of the device diagram for lexical analysis of programs; in fig. 2 is a functional diagram of an example implementation of a control unit; FIG. 3 - firmware § in FIG. 4 - time diagram of the operation of the device.

Устройство дл  лексического анали за программы содержит блок 1 преобразовани  ;регистр 2The device for lexical analysis of the program contains a conversion unit 1; register 2

группы 4 и 5 элементов И, входы сопровождени  6, информационный 7, пуска 85 информационньй выход 9, выходы запроса 10 и готовности llj дещиф- ратор 12 символов, блок 13 управлени , , .groups 4 and 5 elements AND, inputs 6, information 7, start 85 information output 9, outputs 10 and readiness llj decryptor 12 characters, control block 13,.

Между конструкци ми лексических единиц и и х типами и значени ми существует соответствие, задаваемо рдзработчиками компил тора,, Значе- нием лексемы может быть либо последовательность символов 5 образующих - эту конструкцию, либо некоторьй код, Поле значени  дл  некоторых лексем может отсутствовать. Блок 1 преобраз вани  кода Литер в код Лексей задает соответствие между лексими- чвск-тт конструкци ми и их типами При этом блок 1 задает также значеt TThere is a correspondence between the constructions of lexical units and x types and values given by the compiler's developers, “The value of a lexeme can be either a sequence of 5-character symbols — this construct, or some code. The value field for some lexemes may be absent. The unit 1 converts the code of the Liter into the Lexey code and sets the correspondence between the leximi- cvsk-tt structures and their types. At the same time, the block 1 also sets the values T

,,

.1.one

кода Литер в код Лексем .5 группу 3.элементов ИЛИ,code of the letter in the code of Toksem .5 group 3. elements OR,

5 five

00

5five

5five

О 0O 0

00

ние лексемьг, если оно представлено кодом. Кодом могут .быть представлены .значени  лексемы: ключевые слова, разделители. Значени  дл  лексем .Символьна  строка, Идентификатор и число формируютс  из последовательности символов их образующих,lexeme, if represented by code. The code can .present values of tokens: keywords, separators. Values for tokens. A character string, an identifier and a number are formed from a sequence of characters forming them,

Регистр 2 пр.еднаэначен дл  приема и хранени  до -К литер входного текста программы и может быть собран на регистрах сдвига параллельного или последовательного действи . Очередна  литера заноситс  с информационного входа регистра 2 в младщие иты регистра с одновр еменнэм сдвигом со- . держимого. регистра 2 от младщих разр дов к СТАРШИМ, но число разр дов равнсхе Количеству бит в коде символа в случае, подачи импульса на вход сдвига реги стра 2. Register 2 is assigned to receive and store up to-letter input program text and can be assembled on parallel or series action shift registers. The next letter is entered from the information input of the register 2 into the junior ity of the register with the simultaneous shift co. held by register 2 from the lower order bits to the OLDER, but the number of bits is equal to the number of bits in the character code in the case of a pulse input to the shift input of the register 2.

Группы 4 и 5 элементов .И предназначены дл  коммутации соответственно лексемы-(типа) и соответств ующих ей литер (значени ) через группу 3 элементов ИЛИ на информационный выход 9 устройства.: .Groups 4 and 5 elements. And are intended for switching, respectively, tokens- (type) and the corresponding letter (value) through group 3 elements OR to information output 9 of the device:.

Дешифратор 1-2 символов предназначен дл  выработки управл ющего кода по кодам .символов, наход щихс  в самых старших разр дах регистра 2. Управл ющий код:соответствует ютассу этих символов. Выделены следующие классы; символ в старщих разр дах регистра 2 ,буква| символ цифра; символ , ограничивающий символьную строку (например, символ кавычки); символ начала комментари j символ конца комментари ; символ,  вл ющийс  одно - литерн ым разделителем; символ и следующий за ним,  вл ющиес  двулитерным :Разделителем; символ,  вл ющийс  выделенным символом конца программы; последовательность символов в регистре 2, начина  с символа в старших разр дах образует клю-евое слово.A decoder of 1-2 characters is intended for generating a control code using character codes located in the most significant bits of register 2. The control code: corresponds to the length of these symbols. The following classes are highlighted; character in high-order bits of register 2, letter | digit character; a character that restricts a character string (for example, a quotation mark); comment start character j comment end character; the character that is the one lame delimiter; the symbol and the one following it, which are two-sided: Separator; the character that is the highlighted end-of-program character; a sequence of characters in register 2, starting with a character in the higher bits, forms a key word.

Блок 13 управлени  осуществл ет анализ поступающих входньпс (осведомительных ) сигналов и выработку выходных (управл ющих) сигналов, при помощи которых устройство функционирует в соответствии с алгоритмом распознавани  лексем.The control unit 13 analyzes the incoming input (awareness) signals and the generation of output (control) signals by which the device operates in accordance with the lexemes recognition algorithm.

Устройство работает следующим образом. The device works as follows.

В начальный момент регистр 2  вл етс  обнуленным. Устройство запускаетс  подачей импульса на вход 8, по которому начинает работать блок 13At the initial time, register 2 is zero. The device is started by applying a pulse to the input 8, on which the block 13 starts working

управлени , он посылает на выход 10 устройства импульс, по которому на вход 7 устройства должен быть подан первый символ программы. После пода- чи на вход 7 кода симнола на вход 6 устройства подаетс  импульс, подтверждающий наличие символа на входе 7. После этого блок 13 управлени  подает импульс на выход 10, и цикл чте- ни  символа повтор етс  вплоть до заполнени  всего регистра 2. Заполнение последнего определ етс  по выработке на выходе дешифратора 12 символов кода, етличного от нулевого. После заполнени  регистра 2 блок 13 начинает распознавание лексем программы в зависимости от, класса символов , поступающих на вход дешифратора 12 символов.control, it sends a pulse to the output 10 of the device, along which the first character of the program must be fed to the input 7 of the device. After the input of the code 7 of the simnol to the input 6 of the device, a pulse is applied confirming the presence of the character at the input 7. After this, the control unit 13 sends a pulse to the output 10, and the symbol reading cycle repeats until the entire register 2 is filled. the latter is determined by the generation at the output of the decoder of 12 characters of code, distinct from zero. After register 2 is filled in, block 13 begins to recognize the tokens of the program, depending on the class of characters received at the input of the decoder 12 characters.

Если управл ющий код соответству- V ет ключевь М символам, это означает, что в регистре 2, начина  со старших разр дов, наход тс  символы ключевого слова. В этом случае на информационном выходе блока 1 выраба- тьшаетс  тип ( и, если нужно, значение ) лексемы Ключевое слово. На второй вход группы 4 элементов И из блока 13 подаетс  логическа  единица , и .сформированный тип лексемы передаетс  через группу 3 элементов ИЛИ на информационный выход 9 устройства. Одновременно на выход 11 устройства подаетс  импульс, сигнализирующий о готовности на информационном выходе 9 устройства лексемы . После этого символы, наход щие- с  в регистре 2, сдвигаютс  от младших разр дов к старшим с одновременным поступлениемв младшие разр ды нового символа исходной программы с информационного входа устройства. Сдвиг осуществл етс  до выталкивани  из регистра 2 всех символов данного ключевого слова. Конец ключевого слова определ етс  по по влению в старших разр дах регистра 2 символа, отличного от буквы, путем анализа управл ющего кода на выходе дешифратора 12 символов.If the control code corresponds to the key M characters, this means that in register 2, beginning with the highest bits, the characters of the keyword are found. In this case, the type output (and, if necessary, value) of the token Keyword is generated at the information output of block 1. A logical unit is supplied to the second input of a group of 4 elements AND from block 13, and the generated type of token is transmitted through a group of 3 elements OR to information output 9 of the device. At the same time, the output 11 of the device is given a pulse signaling readiness at the information output 9 of the token device. Thereafter, the characters in register 2 are shifted from the least significant bits to the most significant ones, while the lower ones of the new symbol of the source program are received from the information input of the device. The shift is carried out before all characters of the given keyword are ejected from register 2. The end of a keyword is determined by the appearance of 2 characters other than a letter in the upper bits of the register by analyzing the control code at the output of the decoder of 12 characters.

Одновременный прием новых символов программы осуществл етс  путем подачи на выход 10 импульса запрос а символа и ожидани  по влени  единичного сигнала на входе 6. После поступлени  с входа 6 импульса, свидетельствующего о наличии на входе 7 текущего символа программы, произг ю Simultaneous reception of new program symbols is carried out by sending a pulse at the output 10 of a request for a symbol and waiting for the appearance of a single signal at input 6. After a pulse arrives from input 6, indicating the presence of the current program symbol at input 7

1515

2020

2525

418757418757

водитс  сдвиг символов в регистре 2 с приемом нового ст1мвола в младшие разр ды. В дальнейшем прием символов программы осуществл етс  таким же образом. После формировани  лексемы ключевого слова и сдвига его символов в регистре 2 возобновл етс  опрос управл ющего кода на выходе дешифратора 12 символов и выполн ютс  действи , определ емые классном анализируемых дешифратором 12 символов . .the shift of characters is in register 2 with the reception of a new bit in the lower bits. Further, the reception of program symbols is carried out in the same manner. After forming the keyword token and shifting its characters in register 2, the polling of the control code at the output of the decoder of 12 characters is resumed and the actions determined by the class of 12 characters analyzed by the decoder are executed. .

Если символ в старших разр дах регистра 2  вл етс  буквой, это означает начало идентификатора. На информационном выходе блока 1 форми- руетс  тип лексемы, который передаетс  через группу 4 элементов И и группы 3 элементов РШИ на информационный выход 9 устройства путем подачи из блока 13 управлени  соответствующего сигнала. Одновременно на выход 11 готовности подаетс  : импульс, свидетельствующий о наличии на-выходе 9 устройства типа лексемы. После этого на вьпсод 9 устройства передаетс  символ идентификатора через группу 5 элементов И и группу 3 элементов ИЛИ путем подачи на второй вход группы 5 элементов И единицы . При этом на выход 11 готовности подаетс  импульс, св здетельствую- щий о передаче на информационный выход 9 устройства буквы идентифи- (т.е., значени  этой лексемы), Одновременно с передачей буквы иден : тификат9ра на информационный выход 9 устройства с информационного входа 7 устройства указанным способом, поступает новый символ программы. На информационный выход 9 устройства подобным образом передаютс  все символы идентификатора. . .If the character in the high bits of register 2 is a letter, this indicates the beginning of the identifier. At the information output of block 1, a type of lexeme is formed, which is transmitted through a group of 4 elements AND and a group of 3 elements of the RShI to the information output 9 of the device by sending a corresponding signal from the control unit 13. At the same time, an output is supplied to the ready output 11: a pulse, indicating the presence of a lexeme-type device on-output 9. After that, the identifier symbol is transmitted to device ID 9 through a group of 5 elements AND and a group of 3 elements OR by submitting 5 elements AND to the second input of a group. At the same time, an output is sent to the output 11 of readiness implying the transfer of an identifying letter to the information output 9 of the device (i.e., the value of this lexeme). devices in this way, a new program character arrives. All identifier characters are transmitted to information output device 9 in a similar manner. . .

Конец символов идентифшсатора определ етс  по по влению в старших разр дах регистра 2 символа, отличного от буквы и цифры. В этом случае на информационный выход 9 устройства передаетс  нулевой код, свиде- тельствующий о завершении последо- , ватедьности символов идентификатора. Это осуществл етс , путем подачи на выход 11 готовности устройства импульса, поскольку на вторые входы групп 4 и 5 элементов И из блока 13 управлени  не поданы логические единицы, на их выходах присутствуют нулевые коды, которые через группуThe end of the characters of the identifier is determined by the appearance of 2 characters in the upper bits of the register, different from the letter and number. In this case, a zero code is transmitted to the information output 9 of the device, indicating the completion of the sequence of identifier symbols. This is done by sending a pulse to the output 11 of the readiness of the device, since logical units are not supplied to the second inputs of groups 4 and 5 of the elements AND from the control unit 13, there are zero codes at their outputs which, through the group

30thirty

3535

4040

4545

5050

5555

3 элементов ИЛИ передаютс  на информационный выход 9 устройства. После3 OR elements are transmitted to information output 9 of the device. After

I передачи -нулевого кода осуществл ютс  действи  в соответствии с классом ц символов, наход щихс  в старших разр дах регистра 2, I transmissions of a null code are performed in accordance with the class of c symbols, which are in the high bits of register 2,

Если символ в старших разр дах регистра 2  вл етс  цифрой, это означает начало целого числа. На информа- ю ционном выходе блока 1 формируетс If the character in the high bits of register 2 is a digit, it means the beginning of an integer. At the information output unit 1 is formed

i тип лексемы, который передаетс  чеI рез группу 4 элементов И и группу 3 элементов ИЛИ на информационный выход 9 устройства путем подачи из 15 блока 13 управлени  соответствующе- го сигнала. Одновременно на выход 11 , готовности подаетс  импульс, свидетельствующий о наличии на выходе 9 устройства типа лексемы. После этого 20 на выход 9 устройства передаютс  цифры числа через группу 5 элементов И и группы 3 элементов ИЛИ путем подачи соответствующего сигнала из блока 13.-- При этом на в ыход 11 готов- 25 нести подаетс  импульс, свидетельствующий о передаче на информационныйi is a type of token, which is transmitted through a group of 4 AND elements and a group of 3 OR elements to the information output 9 of the device by submitting a corresponding signal from 15 control unit 13. At the same time, output 11, a readiness, is given a pulse, indicating the presence of a lexeme-type device at output 9. After that, 20 at the output of the device 9, the digits of the number are transmitted through a group of 5 elements AND and a group of 3 elements OR by sending a corresponding signal from block 13 .-- At this, exit 11 is ready-25 to carry a pulse indicating the transfer to information

, выход 9 цифры ( т.е., значени  этой лексемы). Одновременно с этим с ин- . формационного входа 7 указанным спо- 30 собом поступает новьй символ программы . Подобным образом на информационный выход устройства передаютс  все цифры числа. Конец- цифр числа определ етс  по по влению в старших 35 разр дах регистра .2 символа, отличного от цифрЫё В этом случае на информационный выход 9 устройства указанным способом передаетс  нулевой код, свидетельствующий о завершении 40 последовательности цифр числа. После передачи нулевого кода осуществл ютс  действи , соответствующие классуThe output is 9 digits (i.e., the meaning of this token). Simultaneously with in-. of the formation input 7, the new symbol of the program enters in this way. Similarly, all digits of a number are transmitted to the information output of the device. End digits of a number is determined by the appearance of a character other than digit in the upper 35 bits of the .2 register. In this case, a zero code is transmitted to the information output 9 of the device in this way indicating the completion of the 40 digit sequence of numbers. After transmitting the zero code, actions are performed that correspond to the class

. символов, наход щихс  в старших разр дах регистра 2.45. characters in the higher bits of the register 2.45

Если символ в старших разр дах регистра 2  вл етс  однолитерным разделителем и не образует со следующим после него двулитерным разделител , на информационном вь1ходе блока 50If the character in the high bits of register 2 is a one-character separator and does not form a two-type separator with the next after it, on the information block of 50

Iформируемс  тип лексемы Одноли- терный разделитель (и, если нужно, его значение). Этот тип передаетс  через группу 4 элементов И и группу 3 элементов Ш1И на информацион- 55 ный выход 9 устройства путем подачи из блока 13 управлени  соответствую- щего сигнала.. Одновременно .на выходеThe lexeme type is formed. The one-letter separator (and, if necessary, its value). This type is transmitted through a group of 4 elements AND and a group of 3 elements S1I to the information output 55 of the device 9 by supplying a corresponding signal from the control unit 13. Simultaneously at the output

IIготовности подаетс  импульс, сви-.A second pulse is given, swi.

детельствук ций о наличии на выходе 9 устройства -типа лексемы. После этого осуществл етс  сдвиг содержимого регистра 2 с поступлением в младшие разр ды нового символа исходной программы. Дальнейшие действи  устройства определ ютс  в зависимости от класса символов, наход щихс  в старших разр дах регистра 2.detentions about the presence at output 9 of the device is a type of lexeme. After that, the contents of register 2 are shifted with the entry of the original program to the lower bits of the new symbol. Further actions of the device are determined depending on the class of symbols located in the high bits of the register 2.

Если символ, наход щийс  в старших разр дах регистра 2, и следующий после него  вл ютс  двз литерным разделителем , на информационном выходе блока 1 формируетс  тип лексемы Двули- терный разделитель (и, если нужно, его значение), В этом случае действи  устройства во всем подобны действи м , осуществл емым при формировании однолитерных разделителей, однако в конце осуществл етс  лдвиг содержимого регистра 2 на два символа с приемом новых символов программы .If the character in the high bits of register 2 and the next after it are two character delimiters, the token type is formed on the information output of block 1. A double type separator (and, if necessary, its value). In this case, the device acts all are similar to the actions performed during the formation of one-liter separators, but in the end, the register 2 is shifted by two characters by two characters with the reception of new program characters.

Если.символ, наход щийс  в старших разр дах регистра2, вл етс  признаком символьной строки (например, кавычкой), на информационном выходе блока 1 формируетс  тип лексемы Символьна  строка. Этот тип передаетс  на информационный выход 9 устройства тем же способом, что и дл  остальных лексем. После передачи ти- па осуществл етс  сдвиг содержимого регистра 2 на один символ с.приемом нов ого символа программы. Поскольку символьна  строка представл ет из себ  последовательность символов, ограниченную с обеих сторон специальными признаками (например, кавычками) передача значени  этой лексемы (самих символов символьной строки) осуществл етс  вплоть до по влени .в старших разр дах регистра 2 второго символа признака символьной строки. Все символы символьной строки, обра- ззпощие значение лексемы, передаютс  из регистра 2 на информационный выход 9 устройства так же, как и сим- воль (значение лексемы) идентификатора . Завершающий символ признака символьной строки выталкиваетс  из регистра 2 (с приемом нового символа ) , и устройствопродолжает работать в зависимости от класса символов наход щихс  в старших разр дах регистра 2.If the character in the high-order bits of register 2 is a sign of a character string (for example, a quotation mark), the type of the token type is formed at the information output of block 1. A character string. This type is transmitted to the information output 9 of the device in the same manner as for the rest of the tokens. After the transfer of the type, the contents of register 2 are shifted by one character from the received new program character. Since a character string represents from itself a sequence of characters, bounded on both sides by special features (for example, quotation marks), the value of this lexeme (the characters of the character string itself) is transmitted until the appearance of the second character of the character string in the upper 2 bits of register 2. All characters of the character string, which represent the value of the token, are transferred from register 2 to information output 9 of the device, as well as the symbol (token value) of the identifier. The terminating character of the character string is pushed out of register 2 (with the reception of a new character), and the device continues to work depending on the class of characters located in the high order bits of register 2.

Если символ, наход щийс  в старших разр дах регистра 2,  вл етс  символом начала комментари , блоком 13 осуществл етс  сдвиг содержимого регистра 2 ( с приемом новых симво™ лов) вплоть до по влени  в старших разр дах последнего символа Конец комментари , который тоже сдвигает- ,с . После этого устройство осуществл ет действи  в зависимости отIf the character in the high bits of register 2 is the character of the beginning of a comment, block 13 shifts the contents of register 2 (with the reception of new characters) until it appears in the high bits of the last character End of the comment, which also shifts - ,with . After that, the device operates depending on

класса символов, наход щихс  в старших разр дах регистра 2.classes of characters that are in the high bits of the register 2.

Если символ, наход щийс  в старших разр дах регистра 2,  вл етс  символом конца программы, устройствоIf the character in the high bits of register 2 is the end of program character, the device

с  коды символов, наход щихс  в регистре 2. Обозначают каждь й разр д регистра 2 булевой переменной у, где Р - номер разр да. Построение системы булевых функций Т начинают с построени  систем булевых функций дл  каждого из разновтадностей лексем Дл  ключевых слов обозначают систе- мУ булевых функций, формирующих тип ключевых слов, через К, дл  идентификаторов - через I, дл  однолитер- ных разделителей - череЭ К1, дл  двулитерных разделителей -.через R2,c character codes that are in register 2. They denote each bit of register 2 as a Boolean variable, where P is the number of the bit. Building a system of Boolean functions T begins with building systems of Boolean functions for each of the different lexemes. For keywords, a system of Boolean functions that form a type of keywords is defined, for K, for identifiers through I, for L1 separators, for K1, for double digits - through R2,

завершает свою работу. Поскольку уст-15 дл  числа - через N, дл  символьныхcompletes its work. Since the word-15 for a number is N, for character

ройство работает в режиме запрос- ответ и после запроса следующего символа ожидает его поступлени  при помощи опроса входа Ответ, после передачи последнего символа программы (символ конца) необходимо еще несколько раз передавать импульс на вход 6 ответа (без фактической установки на информационном входе 7 кода символа) до тех пор, цока символ конца программы не переместитс  из младших разр дов регистра 2 в старшие .The device operates in the request-response mode and, after requesting the next character, waits for its arrival using the Response input polling, after transmitting the last program character (end character), it is necessary to transmit a pulse to the response 6 input several times (without actually setting the character code on information input 7) ) until the end of the program, the end of program symbol will move from the lower bits of register 2 to the higher ones.

Если символ, наход щийс  в старших разр дах регистра 2, не принадлежит ни- к одной из перечисленных групп символов (нелевой код на выходе блока 12), полагаетс , что этот символ принадлежит к группе символов типа Пробел ., Табул ци , Перевод строки и т.п. Символы из этой группы дол сны быть пропущены, что осуществл етс  путем сдвига содержимого регистра 2 и приема нового символа . Затем действи  устройства возобновл ютс  в зависимости от класса символов, наход щихс  в старших разр дах регистра 2.If the character in the high bits of register 2 does not belong to any of the listed groups of characters (the non-positive code at the output of block 12), it is assumed that this character belongs to a group of characters of the type Space, Tabulation, Line break and etc. The characters from this group must be skipped, which is accomplished by shifting the contents of register 2 and receiving a new character. Then, the actions of the device are resumed depending on the class of characters in the higher bits of the register 2.

Построение системы булевьк функций , которые реализуют блок 1, следующее .Building a system of boolean functions that implement block 1 is as follows.

Исходными данными дл  построени  блока 1 служит соответствие между конструкци ми лексических единиц и их типами и значени ми (считают, что типы и значени  в нем представлены в виде двоичных чисел). Блок 1 задает соответствие между лексическими конструкци ми/ и их типами,при этом он задает также и значение, если оно представлено кодом. Рассматривают две системы булевых функций: Т-задающую тип лексемы и М-задающую значение лексемы. Аргу: 1ентами  вл ют5The initial data for building block 1 is the correspondence between the structures of lexical units and their types and meanings (they assume that the types and meanings in it are represented as binary numbers). Block 1 defines the correspondence between the lexical constructions / and their types, and it also sets the value if it is represented by a code. Two systems of Boolean functions are considered: the T-defining type of the lexeme and the M-defining value of the lexeme. Argu: 1tams are 5

С -,-пC -, - n

,констант - через S, Рассматривают по- строение каждой из перечисленных систем в отдельности., constants - through S, Consider the construction of each of the listed systems separately.

0 Нулевые функции f- определ ют следующим образом0 Zero functions f- are defined as follows.

0- если в разр дах регистра 2 на месте, i-ro сим вола (начина  со старших разр дов регистра 2) находитс  символ или 1дифра) .0- if in the bits of register 2 in place, the i-ro symbol of the ox (starting with the higher bits of register 2) is a symbol or 1difra).

1- в противном ,1- otherwise

Эти функции легко реализовать, на- 0 пример, простым перечислением элемен тарных конъюнк1уш в дизъюнктивной нормальной форме (ДНФ), которые принимают значение единицы на наборах значений, соответствующ1гх.. кодам сим 5 волов, отличных от буквы и цифры, These functions are easy to implement, for example, by simply enumerating elementary conjunctive ears in the disjunctive normal form (DNF), which take the value of a unit on sets of values corresponding to hg. Codes of 5 oxen, different from letters and numbers,

В дальнейшем пользуютс  этими функци миIn the future, use these functions.

Систему булевых функций К мож но представить в видеThe system of Boolean functions can be represented as

4040

.Я;.I;

к,.,(л;:,л;,г1., )., ;k,., (l;:, l;, r1.,).,;

K,v,(A,,zVt ) & 4 ui;K, v, (A ,, zVt) & 4 ui;

K,vt(4H;, zt-, ) f.,,,K, vt (4H ;, zt-,) f. ,,,

p где каждое Z :{. (,,. .h«; j 1,...,m;p where each Z: {. (,,. .h "; j 1, ..., m;

,8 5; , ...,K) есть либо переменна  у , либо отрицание переменной Ур f количество ключевых слов, дл  которых в разр де кода типа - количество букв, 8 5; , ..., K) there is either a variable y or the negation of the variable Ur f the number of keywords for which in the discharge of a type code is the number of letters

стоит единица; gthere is a unit; g

в 1-М ключевом слове, у которого в 1-м разр де кода типа стоит единица; 55 m - количество разр дов, необходимых дл  кодировани  исходньЬс симво- лов; К - количество разр дов, необходимых дл  кодировани  типов лексем .in the 1-M keyword, in which in the 1 st category of the type code is one; 55 m is the number of bits needed to encode source symbols; K is the number of bits needed to encode the types of tokens.

Символ, сто щий после ключевого слова, об зательно должен быть не буквой и не цифрой, в противном елучае это не ключевое слово, а идентификатор . Поэтому кажда  элементар I. ., V i . W fThe character after the keyword must not be a letter or a number, otherwise it is not a keyword, but an identifier. Therefore, each elementary I.., V i. W f

:на  конъюнкци  вида Л. , А 7 ,.,: in conjunction of the species L., A, 7,.,

:. . Тг Т ) 1 1J t:. . Tg T) 1 1J t

принимает значение единицы на наборе значений переменных, которое соот- ветствует последовательности из g. |кодов букв дл  некоторого ключевого слова, и в целом вс  конъюнкци  takes the value of one on the set of variable values, which corresponds to a sequence of g. | letter codes for a certain keyword, and generally a conjunction

обращаетс  в нуль функцией f„ fvanish by f „f

: ir ;: ir;

1+-11 + -1

1- в противном случае.1- otherwise.

Функции q W тривиально реализуютс , поскольку дл  каждого i-ro одно;В случае, если после последней буквыFunctions q W are trivially implemented, because for each i-ro one; In case after the last letter

ключевого слова следует буква илиkeyword followed by a letter or

Цифра. Очевидно, что распознавание  Numeral. Obviously, recognition

ключевых слов, как и других лексем,keywords, like other tokens,

осуществл етс  дл  тех из них, нача- 20 литерного разделител  символы, вмес:ло которых располагаетс  в регист- те с которыми он образует двулитер1ре 2 с самых старших разр дов. ный разделитель, - конечное числоcarried out for those of them, the beginning of the 20 letter separator characters, together: which is located in the register with which it forms a two-interleaver 2 with the most senior bits. the new separator is a finite number

I Поскольку идентификатор об затель- (как правило не более). В случае,I Since the identifier is obsessive- (usually no more). When,

|но должен начинатьс  с буквы и одна если каждый этот символ представить| but must begin with a letter and one if each of these characters is represented

буква тоже  вл етс  идентификатором, 25 соответствующей элементарной конъюнк тип дл  идентификатора при помощи iсистемы булевых функций I можно фор- |мировать по кодам символа, наход ще- :гос  в старших разр дах регистра 2.the letter is also an identifier, 25 corresponding to an elementary conjunk type for an identifier with the help of the i-system of the boolean functions I can be formed according to the character codes located in the high-order bits of register 2.

цией в ДНФ и вз ть от полученной ДНФ отрицание, получают соответствующую q . VIn DNF and take the negative from the resulting DNF, the corresponding q is obtained. V

Система R1R1 system

1 VrV.(Aj.z|j) q;;:1 VrV. (Aj.z | j) q ;;:

. г. g

mm

,2, 2

дл  разделителей изfor separators from

|Дл  разр дов кода типа идентификато- ° второй группы имеет вид ра, которые равны единице, все функ- щга I имеют вид| For the digits of the type code, the identifier-° of the second group is of the form ra, which is equal to one, all functions I have the form

1г , zj. ,1g, zj. ,

р S где кажда  Z j (,...,6; j 1,...m|p S where each Z j (, ..., 6; j 1, ... m |

,...К) есть либо переменна  у, либо отрицание переменной Ур, причем это переменные соответствующие, ... K) is either a variable y, or a negation of the variable Ur, and these are the corresponding variables

3535

Rl2 Vj,, (Aj,,) R4 Vb,.() « q,;,Rl2 Vj ,, (Aj ,,) R4 Vb,. () “Q,;,

//

где кажда  Z- (,... ,r ; j 1,. ..m; ,...,K) есть либо переменна  Ур.where each Z- (, ..., r; j 1, ..., m;, ..., K) is either a variable Ur.

.... . . - .. « . .... . - .. “.

старшим разр дам регистра 2, в кото- 40 отрицание переменной у.,, причемthe senior bits of register 2, in which 40 is the negation of the variable y., and

рык находитс  первый символ распознаваемой конструкции; b - количество букв в алфавите  зыка; кажда  элементарна  конъюнкци  Ajl, Z - принимает значение единицы на наборе значений переменных, соответствующих некоторому, коду буквы.The roar is the first character of a recognizable construct; b - the number of letters in the alphabet language; each elementary conjunction Ajl, Z - takes the value of one on the set of values of variables corresponding to some code of the letter.

Остальные функции Ig тождественно равны нулю.The remaining Ig functions are identically zero.

Однолитерные разделители можно разделить на две группы; перва  - это группа разделителей, которые не могут быть началом двулитерных разделителей , и втора  - разделителиOne-liter separators can be divided into two groups; the first is a group of delimiters, which cannot be the beginning of two-delimit delimiters, and the second is delimiters

это переменные соответствующие старшим разр дам регистра 2, в которых находитс  первый символ распознаваемой конструкции; г g количество раз- 45 делителей, дл  которых в 1-м разр де кода типа стоит единица.these are the variables corresponding to the most significant bits of register 2, in which the first character of the recognizable structure is found; g g is the number of dividers, for which there is one in the 1st category of the type code.

Калада  элементарна  конъюнкци  д тт , /Kalada elementary conjunction dt, /

J- принимает значение единицы на J- takes the value of the unit on

наборе значений переменных, которые gg соответствуют некоторому однолитер- ному разделителю, но эта конъюнкци  в целом обращаетс  в нуль соответст- вукщей функцией q. в случае, если первый и второй символы из регистраa set of values of variables that gg correspond to a single-letter separator, but this conjunction generally vanishes by the corresponding function q. in case the first and second characters of the register

которой могут быть началом двулитер- gg 2 образуют двулитерньй разделитель. Щ)1Х разделителей. Дл  однолитерных Система булевых функций R2 дл  разделителей первой группы система двулитерных разделителей строитс  три функций R1 строитс  тривиальным об- виальным образом, в этом случае в разом.. соответствующих ДНФ элементарньтеwhich can be the beginning of a two-gg 2 form a two-splitter. S) 1X separators. For one-liter systems, the system of Boolean functions R2 for separators of the first group of the system of two-liter separators builds three functions R1 is constructed in a trivial, abundant manner, in this case at a time .. the corresponding DNF elements

Рассмотривают построение R2 дл  второй группы/од но литерньлз разделителей . Дл  этого перенумеровьюают все однолитерные разделители из второй группы и дл  ка дой из них ввод т функцию (j0- если в разр дах регистра 2 на месте второго символа (начина  со старших разр дов) стоит q; J символ, который образует вместе с i-м одно- литерным разделителем двулитерный разделитель.;Consider constructing R2 for the second group / single line separators. For this, all the one-liter dividers from the second group are renumbered and for each of them a function is entered (j0 - if in the bits of register 2 the q character is replaced by the second character (starting with the higher bits); J forms the symbol that forms i m single-character separator is a two-character separator .;

1- в противном случае.1- otherwise.

Функции q W тривиально реализуютс , поскольку дл  каждого i-ro одноцией в ДНФ и вз ть от полученной ДНФ отрицание, получают соответствующую q . VThe functions q W are trivially implemented, because for each i-ro by single section in DNF and taking the negative from the obtained DNF, the corresponding q is obtained. V

Система R1R1 system

дл  разделителей изfor separators from

1 VrV.(Aj.z|j) q;;:1 VrV. (Aj.z | j) q ;;:

рой группы имеет вид the group swarm looks like

. г. g

mm

,2, 2

Rl2 Vj,, (Aj,,) R4 Vb,.() « q,;,Rl2 Vj ,, (Aj ,,) R4 Vb,. () “Q,;,

//

где кажда  Z- (,... ,r ; j 1,. ..m; ,...,K) есть либо переменна  Ур.where each Z- (, ..., r; j 1, ..., m;, ..., K) is either a variable Ur.

.... . . - .. « . .... . - .. “.

отрицание переменной у.,, причем denial of variable u., and

это переменные соответствующие старшим разр дам регистра 2, в которых находитс  первый символ распознаваемой конструкции; г g количество раз- делителей, дл  которых в 1-м разр де кода типа стоит единица.these are the variables corresponding to the most significant bits of register 2, in which the first character of the recognizable structure is found; g g is the number of dividers for which there is one in the 1st category of the type code.

Калада  элементарна  конъюнкци  д тт , /Kalada elementary conjunction dt, /

J- принимает значение единицы на J- takes the value of the unit on

наборе значений переменных, которые соответствуют некоторому однолитер- ному разделителю, но эта конъюнкци  в целом обращаетс  в нуль соответст- вукщей функцией q. в случае, если первый и второй символы из регистраa set of variable values that correspond to some one-liter separator, but this conjunction generally vanishes by the corresponding function q. in case the first and second characters of the register

111418757111418757

конъюнкции соответствзпот кодам двух стгеолов, образующих некоторый двули- терный разделитель.conjunctions correspond to codes of two stegols, forming a two-double separator.

Система булевых функций S дл  числа строитс  подобно системе функций дл  идентификатора за исключени БThe system of Boolean functions S for a number is constructed like a system of functions for an identifier except for B

гд ес ца буdc ec ca bu

Т -T -

Т K;v()V.R1 Тг (() VR1,JvR2jW2VS2T K; v () V.R1 Tr (() VR1, JvR2jW2VS2

Т К ,V(lf ( I ,) (,T K, V (lf (I,) (,

букв, а цифр.letters and numbers.

Система булевых функций S дл  символьной строки состоит из функций тоадественно равных нулю, если они соответствуют нулевым разр дам в . коде типа символьной строки, и функций , состо щих из одной элементарной конъюнкции, соответствующей коду символа признака символьной строки (например, кавычки), функции соответствуют единичным разр дам в коде типа символьной строки.The system of Boolean functions S for a character string consists of functions that are identically equal to zero if they correspond to zero digits in. the code type of the character string, and functions consisting of one elementary conjunction corresponding to the character code of the character string of the character string (for example, quotation marks), the functions correspond to one bits in the code type of the character string.

Стро т систему булевых функций Т, кото.ра  задает тип лексем, наход щийс  в регистре 2, она  вл етс  суперпозицией указанных систем буле- вых функций. Build a system of Boolean functions T, which specifies the type of tokens in register 2, it is a superposition of these systems of Boolean functions.

где tf where is tf

Функци  If принимает значение единицы, если в регистре 2, начина  со старших разр дов, располагаетс  ключевое слово, и нул  в противном .случае. Эта функци  формирует признак ключевого слова, которьй выраба тьюаетс  на соответствующем выходе блока 1.The If function takes the value of one, if in register 2, starting with the higher bits, the key word is located, and zero otherwise. This function forms a keyword tag that is generated at the corresponding output of block 1.

Построение системы булевых функций М дл  формировани  значений лексемы , которые задаютс  кодом, во всем аналогично построению системы (1)ункций Т..Building a system of Boolean functions M to form lexeme values that are specified by code is, in all, similar to building a system (1) of functions T.

Рассматривают построение системы булевьпс функций, которые реализуют дешифратор 12 символов. Считают,что дешифратор 12 символов вырабатьшает унитарный управл к ций код. Тогда каждому выходу дешифратора 12 символов соответствует отдельна  буле- ва  функци , котора  дл  соответствующей группы символов, наход щихс Consider the construction of a system of Boolean functions that implement the decoder 12 characters. A 12 character decoder is considered to produce a unitary control code. Then each output of the decoder 12 characters corresponds to a separate Boolean function, which for the corresponding group of characters located

в старших разр дах регистра 2, прини- gg Вькод ПЗУ 14 соединен с входом мает значение единицы, а дл  осталь- регистра 15 микрокоманд. В соответ- нул . .in the higher bits of register 2, received the code of the ROM 14 is connected to the input, the value of the unit, and for the rest of the register 15 micro-commands. In accordance with .

ных Рассматривают каждую функцию в отдельности.They consider each function separately.

ствии со структурой микрокоманды сое динены выходы регистра 15 микрокоманды: разр ды пол  Y - с соответстwith the micro-command structure, the outputs of the register of the 15 micro-commands are connected: the bits of the field Y are equal to

1212

Функци  в дл  группы символов Буква имеет видThe function in the character group for a letter is

В VIn v

А;;.BUT;;.

ве. ve

где ка здое (,.,.,Ь; ,.,.,та) есть либо переменна  у , либо отрицание переменной Ур b - количество букв в алфавите.where each (,.,., b;,.,., m) is either a variable y, or the negation of the variable Ur b is the number of letters in the alphabet.

Ка да  элементарна  конъюнкци Ka da elementary conjunction

соответствует некоторой букАcorresponds to some book

JMJm

ве. ve

функци  с дл  группы символов Цифра строитс  аналогичным образом.Function c for a group of characters. A digit is constructed in a similar way.

Функции Н и Hj начала и конца комментари  стро тс  так же, как и функци  W признака символьной строкИсThe functions H and Hj of the beginning and end of comments are constructed in the same way as the function W of the character string feature.

Функции F и FJ однолитерного и двулитерного разделителей стро тс  соответственно как суперпозиции функций R1 и R2jThe functions F and FJ of one-sided and two-sided separators are constructed respectively as superpositions of functions R1 and R2j.

v,.,Rii;v,., Rii;

FO vr. R2;Fo vr. R2;

Функци  Р признака ключевого на имеет видThe function P of the attribute key has the form

слоlay

Р Vj к..P vj to ..

Очевидно,.что функции, которые реализуютс  блоками 1 и 12 допускают возможность минимизации, что позвол ет уменьшить аппаратные затраты при реализации этих блоков.Obviously, that the functions that are implemented by blocks 1 and 12 allow minimization, which reduces hardware costs when implementing these blocks.

Блок 13 управлени  может быть реализован , например, в виде микропрограммного автомата с использованием ПЗУ (фиг.2). В нем используютс  принудительна  адресаци  и два-адресных пол . Калда  микрокоманда имеет операционное поле Y, поле логических условий X и два адресных пол  А0 и А1. Микропрограммный управл ющий ав- томаи содержит ПЗУ 14, регистр 15 микрокоманд, дешифратор 16, элемент И-ИЛИ 17. 1К-триггер 18, элемент НЕ 19, элемент И 20, мультиплексор 21, генератор 22 синхроимпульсов, в первого по п тьй выходы 23 автома- та, с первого по одиннадцатый входы 24 автомата, вход 25 запуска автома та.The control unit 13 can be implemented, for example, in the form of a firmware automaton using a ROM (FIG. 2). It uses forced addressing and two-address fields. A Kalda microinstruction has an operational field Y, a field of logical conditions X and two address fields A0 and A1. Microprogrammed control automaton contains ROM 14, micro-command register 15, decoder 16, AND-OR element 17. 1K-trigger 18, HE element 19, AND element 20, multiplexer 21, generator 22 sync pulses, first through five outputs 23 the automaton, from the first to the eleventh inputs of the 24 automaton, the input 25 of the launch of the automaton.

Вькод ПЗУ 14 соединен с входом регистра 15 микрокоманд. В соответ-  Vcode ROM 14 is connected to the input of the register 15 microinstructions. According to

ствии со структурой микрокоманды соединены выходы регистра 15 микрокоманды: разр ды пол  Y - с соответстwith the micro-command structure, the outputs of the micro-command register 15 are connected: the bits of the field Y are the corresponding

вующими выходами 23 автомата, разр ды пол  X - с входом дешифратора 16, разр ды полей А0 и А1 - с адресным Входом ПЗУ 14, управл емым через мул типлексор 21 соответственно с выходами элемента И-ИЛИ 17 и элемента НЕ 19, выходы дешифратора 16 и входы 24 автомата - с входами элемента И-ИЛИ 17, Первьй разр д из пол  Y )регистра 15 соединен с К входом 1К триггера 18, на 1-вход которого поступает сигнал запуска, а пр мой вы- 5сод которого соединен с первым входом элемента И 20. На второй вход последнего поступают тактовые импульсы с генератора 22 синхроимпульсов. Выход элемента И 20 соединен с вхо дом чтени  ПЗУ 14.23 automaton outputs, bits of field X — with the input of the decoder 16, bits of the fields A0 and A1 — with the address Input of the ROM 14, controlled through a mule typelexer 21 respectively with the outputs of the AND-OR element 17 and the HE element 19, the decoder outputs 16 and inputs 24 of the automaton - with the inputs of the element AND-OR 17, the first bit of the floor Y) of the register 15 is connected to the input 1K of the trigger 18, to the 1-input of which receives a start signal, and the direct output of which is connected to the first input the element And 20. At the second input of the last received clock pulses from the generator 22 clock pulses. The output of the element And 20 is connected to the input of the reading of the ROM 14.

Микропрограммньй управл ющий авто Цат работает следующим образом, ; В исходном состо нии рвгистр 15 Микрокоманд и тригг ер.18 наход тс  . в нулевом состо нии, в результате чего устанавливаетс  нулевой адрес ПЗУ. Импульс запуска с входа 25 переключает 1К-триггер 18 в единичное состо ние, в результате чего тактовые импул1 сы проход т, на вход чтени  ПЗУ 14., возбужда  в каждом такте процесс чтени  микрокоманды из ПЗУ 14, Выбранна  из ПЗУ 14 микрокоманда поступает на регистр 15 микрокоманд и обрабатьгоаетс  следующим образом, Поле Y образует управл юшрне сигналы Адрес следующей микрокоманды опреде™ л етс  пам тью А0 и А1 в зависимости от значени  пол  X и логических условий, поступающих по группе входов 25« Если выбранное дешифратором 16 условие равно нулю или в поле X указьшаетс  условие тождественно равное нулю (микрокоманда без провер- ки -логического услови ), выбираетс  по взводу элемента НЕ 19 адрес А1, а если указанное в команде условие равно единице, по выходу элемента И-ИЛИ 17 выбираетс  адрес А в качестве адреса следующей микрокоманды . Работа микропрограммного упраЬл - ющего автомата заканчиваетс , если указьшаетс  спеиз1альна  микрокоманда останова. Эта микрокоманда имеет единицу в первом разр де рол  Y регистра 15 и нули в остальных разр - дах. По этой микрокоманде из первого разр да регистра 15 поступает сигнал на К вход 1К-триггера 18, пере- вод щий его в нулевое состо ние и темFirmware control auto Tsat works as follows,; In the initial state, the rgist 15 microinstructions and trigger er.18 are located. in the zero state, as a result of which the zero address of the ROM is set. A start pulse from input 25 switches the 1K-trigger 18 to a single state, as a result of which the clock pulses pass to the read input of ROM 14. Exciting in each step the microcommand reading process from ROM 14, the microcommand selected from ROM 14 enters the register 15 microinstructions and processing are as follows. Field Y forms control signals. The address of the next microcommand is defined by memory A0 and A1 depending on the value of field X and logical conditions received by the input group 25 "If the condition selected by the decoder 16 is zero or and in the X field the condition is identically equal to zero (a microcommand without checking the logical condition), is selected by the cocking of the element NOT 19 is address A1, and if the condition specified in the command is equal to one, by the output of the element AND-OR 17 the address A is chosen as addresses of the next microinstruction. The operation of the microprocessor control automaton is terminated if a specific stop microcommand is specified. This microinstruction has a unit in the first digit of the Y register of 15 and zeros in the remaining bits. According to this micro-command, the first bit of register 15 receives a signal at K input of a 1K-flip-flop 18, bringing it to the zero state and

самым запрещающий проход тактовых импульсов через элемент И 20,the most prohibiting the passage of clock pulses through the element And 20,

В случае, если в качестве управ- л кнцего автомата выбрать микропрограммный управл ющий автомат, работа устройства определ етс  микропрограммой дл  этого автомата. При описании микропрограммы используют  зык Фз нкционального микропрограммировани  (Ф- зык), который  вл етс  средством описани  функций операционных устройств на уровне микропрограммы безотносительно к структуре (аппаратуре ) , котора  может быть использована дл  реализации этих функций. Фз нкциональна  микропрограмма, содержит в себе два рода сведений, две части; описание слов и массивов, устанавливающее типы и форматы слов, с которыми оперирует микропрограмма; содержательный граф микропрограммы; которьй определ ет алгоритм вьтолне- ни  операций в содержательной форме- в виде описаний микроопераций и логических условий.In the event that a microprogram control automaton is selected as the automaton control automaton, the operation of the device is determined by the microprogram for this automaton. When describing a microprogram, the language Fc of the national microprogramming is used (F-language), which is a means of describing the functions of operating devices at the microprogram level irrespective of the structure (hardware) that can be used to implement these functions. Fz is a microprogram that contains two kinds of information, two parts; description of words and arrays, establishing the types and formats of words with which the firmware operates; content graph firmware; which defines the algorithm for executing operations in a meaningful form, in the form of descriptions of microoperations and logical conditions.

.Множество слов, с которыми рабо- - тает микропрограмма,, описываетс  в виде таблицы.The set of words the microprogramme works with is described in the form of a table.

Предполагаетс , что запуск блока 13 управлени  осуществл етс  до нача ла работы микропрограммы подачей импульса на вход 8 устройства.It is assumed that the start of the control unit 13 is carried out before the start of the microprogram operation by applying a pulse to the input 8 of the device.

Содержательньй граф микропрограм- t-fbi соответствующий алгоритму работы устройства, изображен на фиг« 3.The content graph of the firmware t-fbi corresponding to the algorithm of the device operation is shown in FIG.

На фиг. 4 - изображена временна  диаграмма работы устройства во врем  осуществлени  лексического анализа программы, FIG. 4 shows a time diagram of the operation of the device during the implementation of a lexical analysis of a program;

Claims (1)

Формула изобретени Invention Formula Устройство дл  лексичесного анали за программ, содержащее блок преобра зовани  кода Литер в код Лексем, регистр, группу элементов ИЛИ и две группы элементов И, причем информа- .ционный вход регистра  вл етс  ин- формационньм входом устройства, информационные выходы регистра, соответствующие отдельным символам, подключены к информационным входам блока преобразовани  кода Литер в код Лексем, входы которого соединены с первыми входами элементов И первой группы, выходы которых подключены к первы рходам элементов ИЛИ группы, выходы которых образуют информационные выходы устройства,A device for lexical analysis of programs containing a block for converting a code of a letter into a code of a token, a register, a group of OR elements and two groups of AND elements, the information input of the register being the information input of the device, the information outputs of the register corresponding to individual characters , are connected to the information inputs of the conversion block of the code of the Letter to the code of LeXem, the inputs of which are connected to the first inputs of the AND elements of the first group, the outputs of which are connected to the first inputs of the OR elements, the outputs of which x data outputs form the device - : .15 . 1418757 вторые входы элементов ИЛИ группы ра, соединены с выходами элементов И второй группы, первые входы которых подключены к выходам регистра, соот- ветствун цим первому введенному в не-;г6 символу,, отличающеес  тем, что, с целью расширени  функциональных возможностей за счет обеспечени  лексического анализа программ на  зыках высокогй уровн  в свободном Формате и расггознавани  лексемы Символьна  строка, в него- : .15 . 1418757 the second inputs of the elements OR of the pa group are connected to the outputs of the elements AND of the second group, the first inputs of which are connected to the outputs of the register corresponding to the first character entered in the non-, r6 character, characterized in that, in order to extend the functionality by provision of lexical analysis of high-level language programs in a free Format and recognition of a token A character string, into it введены дешифратор символов и блок управлени , причем первьй и второй информационные входы дешифратора символов соединены с выходами регист10the character decoder and the control unit are entered, the first and second information inputs of the character decoder are connected to the outputs of the register 10 1515 ром ход пер рой с  уст вто клю И п вен сое стр ка тов ветrum first feather from mouth of mouth 57 ра, 57 ra, 16sixteen соответствующими первому и вто рому введеннь м в него символам, выход дешифратора символов Соединен с первым входом блока управлени , второй и третий входы которого  вл ютс  входами пуска и сопровождени  устройства соответственно, первьй и второй выходы блока управлени  под- . ключены к вторым вxoдa s элементов И первой и второй группы соответственно , третий выход блока управлени  соединен с входом синхронизацш. регистра , четвертый и п тый выходь блока управлени   вл ютс  выходами готовности и запроса.устройства соответственно . .corresponding to the first and second characters entered into it, the output of the character decoder Connected to the first input of the control unit, the second and third inputs of which are the start and tracking inputs of the device, respectively, the first and second outputs of the control unit pod-. Are connected to the second input s of the elements AND of the first and second groups, respectively, the third output of the control unit is connected to the synchronization input. the register, the fourth and fifth output of the control unit are readiness and request outputs of the device, respectively. . 2J2J Т Y T Y 1818 2525 о-about- гоgo ОТFROM гg 19nineteen && тО-1tO-1 Фиг.22 5five Г. 1 4G. 1 4 5 «о ег5 "about him i fl 1- а « ti fl 1- a «t
SU874197281A 1987-02-18 1987-02-18 Device for lexical analysis of programs SU1418757A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU874197281A SU1418757A1 (en) 1987-02-18 1987-02-18 Device for lexical analysis of programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU874197281A SU1418757A1 (en) 1987-02-18 1987-02-18 Device for lexical analysis of programs

Publications (1)

Publication Number Publication Date
SU1418757A1 true SU1418757A1 (en) 1988-08-23

Family

ID=21286652

Family Applications (1)

Application Number Title Priority Date Filing Date
SU874197281A SU1418757A1 (en) 1987-02-18 1987-02-18 Device for lexical analysis of programs

Country Status (1)

Country Link
SU (1) SU1418757A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельетвс СССР № 1187173, кл. G 06 F 15/04, 1985. Авторское свидетельство СССР fP 1238103, кл. G 06 F 15/38, 9/44, 1986. *

Similar Documents

Publication Publication Date Title
US4670848A (en) Artificial intelligence system
CN102741859A (en) Methods and apparatuses for reducing power consumption in a pattern recognition processor
SU1418757A1 (en) Device for lexical analysis of programs
Mössenböck Alex—a simple and efficient scanner generator
SU1399767A1 (en) Device for syntax-controlled translation
SU1399741A1 (en) Syntax analyzer
SU934487A1 (en) Device for forming lexic files
Phillips et al. A message-passing control structure for text understanding
SU1413615A2 (en) Basic function generator
SU468234A1 (en) Device for entering discrete data
SU964619A1 (en) Lingvistic terminal
SU1034043A1 (en) Meta microassembler lexical analysis device
SU1363478A1 (en) Code converter
SU1352479A1 (en) Information input device
SU1013938A1 (en) Computer interfacing device
KR910007307A (en) Communication control device
SU1091160A1 (en) Firmware control device
SU1283798A1 (en) Device for translating codes from one language to another
JPS6226028B2 (en)
JP2917786B2 (en) Natural language interface method
SU773624A1 (en) Processor with microprogram control and dynamic branching
JP2937641B2 (en) Communication method between application programs
SU1238104A1 (en) Device for translating codes from one language to another
JPH01177629A (en) Keyboard processing system
Finin et al. Augmenting ATNs