EP0735467B1

Compiler with generic front end and dynamically loadable back ends

Abstract

This record has no abstract on file.

EP0735467B1, drawing sheet 1
Sheet 1 of 7

Term

Term ended

Expired 14 March 2016, 10.5 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

17 claims: 7 independent, 10 dependent

  1. 1
    An apparatus for compiling a source code file and producing variable target outputs therefrom, comprising:a front end (201) that accepts the source code file and produces therefrom an abstract syntax tree (300) that represents the syntactic structure of the source code file, the abstract syntax tree (300) having at least one abstract syntax tree node;at least one back end (123) that produces an associated back end tree (500) from the abstract syntax tree (300), and further produces from the back end tree (500) a target output, the back end tree (500) having at least one back end tree node;and, a generic back end (203) that controls the at least one back end (123) to produce the associated back end tree (500), such that each back end (123) is independent of the generic back end (203) and dynamically loaded by the apparatus during execution;wherein the generic back end is capable of operating with a number of independent back ends that are loaded at run time whereby each back end creates its own back end tree and whereby, by means of the generic back end, a node in one back end tree is allowed to refer to a node in another back end.
  2. 7
    The apparatus of one of claims 3-6, wherein each back end node is an object and the add operation (209) is a method of the object.
  3. 8
    The apparatus of one of claims 1-7, further comprising:a memory device (103) that stores the abstract syntax tree (300), the at least one back end tree (500), the generic back end (203) and the at least one back end (123);and a processing device (115) that executes the generic back end (203) and the at least one back end (123) to produce from the at least one back end (123) at least one target output.
  4. 9
    The apparatus of one of claims 1-8, wherein each back end (123) and each back end node associated with the back end (123) has a family identification value, wherein the generic back end (203) further comprises:a look up operation (207) that returns zero or more nodes from at least one back end tree (500) having a family identification value and attached to a node of the abstract syntax tree (300) in response to a request from a back end (123) specifying the family identification value and the node of the abstract syntax tree (300).
  5. 10
    A method for compiling a source code file and producing variable target outputs therefrom, comprising the steps of:providing a source code file;executing a compiler (109) having a front end (201) and a generic back end (203);loading a number of back ends (123) to operate with the generic back end (203);creating an abstract syntax tree (300) from the source code with the front end (201), the abstract syntax tree (300) including a root node and at least one child node;each back end (123) of said number producing an associated back end tree (500) from the abstract syntax tree (300), and further producing from the back end tree (500) a target output, the back end tree (500) having at least one back end tree node;and the generic back end (203) controlling each back end (123) of said number to produce the associated back end tree (500), such that each back end (123) is independent of the generic back end (203) and dynamically loaded by the apparatus during execution;whereby each back end creates its own back end tree and whereby, by means of the generic back end, at least one node in at least one back end tree refers to a node in another back end.
  6. 16
    The method of one of claims 10-15, wherein the step of selecting nodes of the abstract syntax tree (300) is performed recursively.
  7. 17
    The method of one of claims 10-16, wherein each back end (123) and back end node associated therewith has a family identification value, further comprising the steps of:receiving a request specifying a family identification value and a node of the abstract syntax tree (300);and returning zero or more back end nodes from at least one back end tree (500) having a same family identification value and attached to the node of the abstract syntax tree (300).