TutorialEditor Scripts




Prev | Up | Next | Back | Forward | Tutorial Top

Ada-ASSURED has a built-in scripting language that can invoke any editor command, and has access to the complete syntactic structure of an Ada program.

Here is a sample script that defines command count to count the number of names in a file.

The script traverses the current buffer, increments counter n for each instance of syntactic construct Name in the file, and prints the count in the status pane.

Tools can send Ada-ASSURED scripts to be executed using the utility sg-client. For example, Ada-ASSURED could be sent a script to load a given file and scroll to a given line. Thus, Ada-ASSURED can be used as an ``editor server'' by an Ada development environment.


Forward