Table driven translator
Abstract
A table driven translator is provided which is capable of translating an input language into a machine-oriented language and handing changes in the syntax of the language inputted to a computer by rewriting a translation rule table. The translator comprises an input device for inputting an input language to the computer, an internal storage for storing a name table for registering keywords associated with the syntax of the input language and characteristics of variable contained in the input language, and for storing an interpretation table for indicating procedures to control a flow of processing for interpreting the input language, and a control device for searching the name table to obtain an address of a location in the internal store device at which desired reserved words or a keyword is stored and to obtain from the name table an attribute of the keyword and variable and for checking whether or not the reserved word coincides with the input language syntax by a comparator comparing the attribute with an attribute stored in a field at a location indicated by a table pointer in the interpretation table, that is, the reserved word is assumed to be conforming to the input language syntax if these attributes are equal to each other, thereby to execute an interpretation processing and to translate the input language into a machine-oriented language suitable for a desired computer. The maintainability and expandability of language processing in the computer is improved.
Claims
exact text as granted — not AI-modifiedI claim:
1. A language processing system for translating an input statement of a selected source language into a lower-level machine-oriented language comprising: (a) input means for inputting an input statement written in the selected source language of a computer; (b) storage means for storing a first table for storing keywords of grammer of said selected source language and characteristics of the keywords and for storing characteristics of variables used in a program coded by said selected source language; a second table for storing information of control procedures for interpreting the input statement to translate the input statement into a lower-level machine-oriented language, said information being .[.predetermined and.]. based on syntax/grammer of the selected source language; (c) control means.Iadd., coupled to said input means, and said storage means.Iaddend., for controlling translation processing of an input statement written in the selected source language from said input means, said control means including searching means .Iadd.comparing means, and converting means, said searching means .Iaddend.responsive to said input statement for searching said first table to obtain a location therein at which a desired keyword variable is stored and to obtain an attribute associated with said keyword .Iadd.and .Iaddend.variable; .Iadd.said .Iaddend.comparing means for comparing said attribute from said searching means with a corresponding attribute stored in said second table to check whether the syntax of the input statement .[.meets.]. .Iadd.matches .Iaddend.the grammer of said selected source language; and .Iadd.said .Iaddend.converting means responsive to a determination of a match between said attribute as a result of the comparison by said comparing means, for converting said input statement into a lower-level machine-oriented language based on a .[.predetermined.]. conversion rule.
2. The system according to claim 1, wherein said first table comprises: a name area for storing the name of reserved words as said keywords and the name of variables; an attribute area for storing codes indicating attributes defined for each meaning of the names stored in said name area; an address area for storing addresses within the store means of the variables stored in said name area; a code area for storing codes indicating types of said reserved words; a value area for storing values identifying reserved words having the same attribute; and a pointer area for storing a pointer indicating where an interpretation control procedure for an instruction indicating by said reserved word starts in said second table. .[.3. The system according to claim 1 wherein said second table stores information of a precessing procedure for checking whether or not the attribute of an input statement word including one of a keyword, variable numerical value and delimiter matches with the selected source language syntax and information of a processing procedure to be executed with the attribute of the word matches with the selected source language syntax and a processing procedure to be executed when the attribute of the word does not match with the selected source language syntax, following the result of said matching check..]. .[.4. The system according to claim 1, wherein said second table comprises: a first area for storing attributes for input statement words to be checked for the selected source language syntax; a second area for storing the destination of a processing to be executed when an input statement word matches with said attribute in said first area; a third area for storing details of a processing to generate said lower-level machine-oriented language, corresponding to the processing destination indicated in the said second area when the input word matches with said attribute in said first area; a fourth area for storing a pointer indicating the destination of a reference on the second table for checking the attribute of the next statement word when the input statement word matches with said attributes, and a fifth area for storing a location in the second table to be referred to in the first area to further compare the input statement word with another attribute in said location in the second table or the content of an error processing when the input statement word does not match with said attribute in said location in the second table..]. .[.5. The system according to claim 4 wherein said first area in said second table includes codes for accessing subroutines and information concerning translation control procedures for said subroutines as described in a specified location of said second table..]. .[.6. The system according to claim 4 wherein said second area of the second table has a flag indicating whether the name of each of the symbols stored in the second area is a direct value or an indirect value..]. .[.7. The system according to claim 4 wherein each of said first to fifth areas of said second table stores the name of symbols, displacement values of the contents and locations indicated by the symbol names and a flag indicating whether a name of a
symbol is an indirect value or an error number..]. 8. The system according to claim 1 wherein said second table includes a processing program
representing said predetermined conversion rule. 9. The system according to claim 1 wherein said storage means includes a random access memory for selectively loading the contents of said first and second tables for each
selected source language. .Iadd.10. The system according to claim 1, wherein said second table comprises: a first area for storing attributes for input statement words to be checked for the selected source language syntax; a second area for storing the destination of a processing to be executed when an input statement word matches with said attributes in said first area; a third area for storing details of a processing to generate said lower-level machine-oriented language, corresponding to the processing destination indicated in the said second area when the input word matches with said attribute in said first area; a fourth area for storing a pointer indicating the destination of a reference on the second table for checking the attribute of the next statement word when the input statement word matches with said attributes, and a fifth area for storing a location in the second table to be referred to in the first area to further compare the input statement word with another attribute in said location in the second table or the content of an error processing when the input statement word does not match with said
attribute in said location in the second table. .Iaddend. .Iadd.11. The system according to claim 10, wherein said second table stores information of a processing procedure including a sequence of attributes which reflects grammatically correct sequence parameters for every type of permissible statement of said selected language, said information being used to check, by comparing said attribute stored in a location of said second table with an attribute of an input statement fetched from said first table or determined through syntaxical analysis whether or not the attribute of an input statement word including one of a keyword, variable numerical value and delimiter matches with the selected source language syntax and information of a processing procedure to be executed when the attribute of the word matches with the selected source language syntax and a processing procedure to be executed when the attribute of the word does not match with the selected source language syntax, following a result of said matching check to check whether alternative words are possible or not at the location of an input statement by changing a parameter to a value
in said fifth area. .Iaddend. .Iadd.12. A language processing system for translating an input statement of a selected source language into a lower-level machine-oriented language comprising: (a) input means for inputting an input statement written in the selected source language of a computer; (b) storage means for storing a first table for storing keywords of grammar of said selected source language and characteristics of the keywords and for storing characteristics of variables used in a program coded by said selected source language; a second table for storing information of control procedures for interpreting the input statement to translate the input statement into a lower-level machine-oriented language, said information being based on syntax/grammar of the selected source language; (c) control means, coupled to said input means, and said storage means, for controlling translation processing of an input statement written in the selected source language from said input means, said control means including searching means, comparing means, and converting means, said searching means responsive to said input statement for searching said first table to obtain a location therein at which a desired keyword variable is stored and to obtain an attribute associated with said keyword and variable; comparing means for comparing said attribute from said searching means with a corresponding attribute stored in said second table to check whether the syntax of the input statement matches the grammar of said selected source language; converting means, responsive to a determination of a match between said attributes as a result of the comparison by said comparing means, for converting said input statement into a lower-level machine-oriented language based on a conversion rule; and wherein said second table comprises a first area for storing attributes for input statement words to be checked for the selected source language syntax; a second area for storing the destination of a processing to be executed when an input statement word matches with said attribute in said first area; a third area for storing details of a processing to generate said lower-level machine-oriented language corresponding to the processing destination indicated in the said second area when the input word matches with said attribute in said first area; a fourth area for storing a pointer indicating the destination of a reference on the second table for checking the attribute of the next statement word when the input statement word matches with said attributes; a fifth area for storing a location in the second table to be referred to in the first area to further compare the input statement word with another attribute in said location in the second table or the content of an error processing when the input statement word does not match with said attribute in said location in the second table; and wherein said first area in said second table includes codes for accessing subroutines and information concerning translation control procedures for said subroutines as described in a specified location of said second
table. .Iaddend. .Iadd.13. A language processing system for translating an input statement of a selected source language into a lower-level machine-oriented language comprising: (a) input means for inputting an input statement written in the selected source language of a computer; (b) storage means for storing a first table for storing keywords of grammar of said selected source language and characteristics of the keywords and for storing characteristics of variables used in a program coded by said selected source language; a second table for storing information of control procedures for interpreting the input statement to translate the input statement into a lower-level machine-oriented language, said information being based on syntax/grammar of the selected source language; (c) control means, coupled to said input means, and said storage means, for controlling translation processing of an input statement written in the selected source language from said input means, said control means including searching means, comparing means, and converting means, said searching means responsive to said input statement for searching said first table to obtain a location therein at which a desired keyword variable is stored and to obtain an attribute associated with said keyword and variable; comparing means for comparing said attribute from said searching means with a corresponding attribute stored in said second table to check whether the syntax of the input statement matches the grammar of said selected source language; converting means responsive to a determination of a match between said attributes as a result of the comparison by said comparing means, for converting said input statement into a lower-level machine-oriented language based on a conversion rule; and wherein said second table comprises a first area for storing attributes for input statement words to be checked for the selected source language syntax; a second area for storing the destination of a processing to be executed when an input statement word matches with said attribute in said first area; a third area for storing details of a processing to generate said lower-level machine-oriented language corresponding to the processing destination indicated in the said second area when the input word matches with said attribute in said first area; a fourth area for storing a pointer indicating the destination of a reference on the second table for checking the attribute of the next statement word when the input statement word matches with said attributes; a fifth area for storing a location in the second table to be referred to in the first area to further compare the input statement word with another attribute in said location in the second table or the content of an error processing when the input statement word does not match with said attribute in said location in the second table; and wherein said second area of the second table has a flag indicating whether the name of each of the symbols stored in the second area is a direct value or an indirect value. .Iaddend. .Iadd.14. A language processing system for translating an input statement of a selected source language into a lower-level machine-oriented language comprising: (a) input means for inputting an input statement written in the selected source language of a computer; (b) storage means for storing a first table for storing keywords of grammar of said selected source language and characteristics of the keywords and for storing characteristics of variables used in a program coded by said selected source language; a second table for storing information of control procedures for interpreting the input statement to translate the input statement into a lower-level machine-oriented language, said information being based on syntax/grammar of the selected source language; (c) control means, coupled to said input means, and said storage means, for controlling translation processing of an input statement written in the selected source language from said input means, said control means including searching means, comparing means, and converting means, said searching means responsive to said input statement for searching said first table to obtain a location therein at which a desired keyword variable is stored and to obtain an attribute associated with said keyword and variable; comparing means for comparing said attribute from said searching means with a corresponding attribute stored in said second table to check whether the syntax of the input statement matches the grammar of said selected source language; converting means responsive to a determination of a match between said attributes as a result of the comparison by said comparing means, for converting said input statement into a lower-level machine-oriented language based on a conversion rule; and wherein said second table comprises a first area for storing attributes for input statement words to be checked for the selected source language syntax; a second area for storing the destination of a processing to be executed when an input statement word matches with said attribute in said first area; a third area for storing details of a processing to generate said lower-level machine-oriented language corresponding to the processing destination indicated in the said second area when the input word matches with said attribute in said first area; a fourth area for storing a pointer indicating the destination of a reference on the second table for checking the attribute of the next statement word when the input statement word matches with said attributes; a fifth area for storing a location in the second table to be referred to in the first area to further compare the input statement word with another attribute in said location in the second table or the content of an error processing when the input statement word does not match with said attribute in said location in the second table; and wherein each of said first to fifth areas of said second table stores the name of symbols, displacement values of the contents and locations indicated by the symbol names and a flag indicating whether a name of a symbol is an indirect value or an error number. .Iaddend.Join the waitlist — get patent alerts
Track USRE33706E — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.