home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 24
/
CD_ASCQ_24_0995.iso
/
vrac
/
vbos201.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1995-04-23
|
6KB
|
147 lines
VBossAPI.DLL v1.0 rev 2.01
Copyright ⌐ 1995, Greg Truesdell
CIS : 74131,2175
Internet: 74131.2175@compuserve.com
=========================================================================
SEE VBOSSAPI.HLP TOPIC "Getting Started" FOR IMPORTANT INFORMATION!
=========================================================================
As of Revision 1.80 VBossAPI supports multiple instances!
INCLUDES A FULLY FUNCTIONAL VARIABLE EXPRESSION EVALUATOR!
PLUS: A complete example including modules you can use in your own
programs. This example application has been expanded and updated to
include label and conditional flow control.
As of revision 1.61b, the COMMA character is now a reserved operator.
As of revision 1.62 the following new functions are added:
ParseUntil()
TestNumExpr()
ARCHIVE CONTENTS
================
This archive should include the following files:
readme.txt The file you are reading
register.txt registration form
vbossapi.bas Visual Basic Declarations
vbossapi.dll The Library
vbossapi.hlp The Windows Help file
sweetpea.zip An extensive demonstration application
INTRODUCTION
============
VBossAPI.DLL is a library of functions that help the Visual Basic Programmer
develop script-parsing applications. Although it is not a complete set of
tools for compiler design, it is a good set of script processing tools.
The functions provided offer both Word-Related and Keyword/Token related
operations required to implement text parsing and script processing applications.
There are functions for parsing text strings, defining keyword tokens (for
language-independant scripts) and defining simple variables. Also included are
functions for storing and loading keyword/token tables. This allows you to
support several languages without changing the basic code of your application.
Operators (ie: =, (), *, / etc) are supported internally to simplify the
development process.
THEORY OF OPERATION
===================
TOKENS, KEYWORDS and OPERATORS
------------------------------
VBossAPI.DLL allows you to relate a text string (ie: BEGIN) with a token value
(ie: 100). Operators (ie: !@#$%^&*()-=+{}[], etc) use predefined tokens. Word
delimiters are defined internally (all characters from &H01 to &H20)
for token related functions. All you need to do is define the keywords you
want to use.
Once you have defined the keywords and their tokens, you then write an
interpreter to operate on sequences of tokens (Syntax). VBossAPI.DLL provides
the core functions required for scanning text and determining the type of
word or keyword found.
For example: If you were to define the following:
Keyword Token
--------------- ------
DIM 100
INTEGER 101
AS 102
and you passed a text string with the following text in it:
Dim Counter As Integer
Counter=10*3
the VBossAPI.DLL NextToken() function, on subsequent calls, would return:
Token Keyword
----- ----------
100 DIM
-3 COUNTER (-3 or NT_TOKEN_NOTFOUND)
102 AS
101 INTEGER
... at this point your code would know enough to define the variable.
... (See AddVariable())
-5 COUNTER (-5 or NT_VARIABLE_FOUND)
22 = (Pre-defined operator token)
-3 10 (-3 or NT_TOKEN_NOTFOUND In this case, a CONSTANT)
3 * (Pre-defined operator token)
-3 3 (-3 or NT_TOKEN_NOTFOUND In this case, a CONSTANT)
-1 (-1 or NT_PAST_EOL or End of the Program)
The token values tell your program what action to take. The keyword contents
provide enough information to determine how they should be used. If the token
value is negative, the current keyword is not a reserved keyword; it is most
likely a constant (ie: number) or a variable name.
All of the dirty work concerned with parsing the language components is handled for
you by the token related functions. And whenever a defined variable is encountered
in the script, the NextToken() function let's you know that is a variable. All you
need to do is get its value and data type with the GetVariable() call.
WORD and TEXT PARSING OPERATIONS
--------------------------------
VBossAPI includes a complete set of word (text fragments) parsing functions. You
can use these with or without the token parsing functions. Beyond the obvious
word and line counting possibilities you can implement content and context
sensitive text formatting. In concert with token related functions, you can build
source code formatters, parsers and reporters.
Once you are no longer burdened with the details of parsing and separating text
fragments you are freed to concentrate on what functionality you want in your
program.
BEST OF ALL, IT'S INEXPENSIVE!
==============================
For the cost of less than an hours work, you can have the whole set. The functions
are clean and fast. And, once registered, you are free to distribute the DLL with
your applications without royalties (just so long as you do not distribute it as
part of a product that performs the same basic functions.)
Also, any problems or suggestions concerning the library will be responded to quickly
and courteously.
FOR MORE INFORMATION
====================
You can now register VBossAPI.DLL On-Line with CompuServe. Use GO SWREG and
select ID #4362.
See the REGISTER.TXT and VBOSSAPI.HLP files.
Please remember that, once you have registered VBossAPI.DLL you MAY NOT distribute,
in any readable form, the registration key sent to you. The key is a contract
between us and insures that you will recieve continued updates for a supported
product. Thank you.