NorKen Technologies, Inc.


Home Page of NorKen Technologies, Inc. Information About NorKen Technologies, Inc. Information About NorKen Technologies' Products Information About NorKen Technologies' Services Information About Ordering NorKen Technologies' Products How to Contact NorKen Technologies


FAQs



Free Trial

Order



Downloads

Grammars
















































































































Release Notes for ProGrammar Version 1.2


Calling the Parse Engine

The parse engine can be integrated with your applications as a DLL, static link library, or ActiveX component. The following table shows how the filenames of these components have changed between versions 1.2 and 1.01.

Component Version 1.2 Version 1.01
Dynamic link library
and import library
Pgmr120.dll
Pgmr120.lib
Pgmr101.dll
Pgmr101.lib
ActiveX component
and type library
PgmrX120.dll
PgmrX120.tlb
Pgmr101.ocx
Pgmr101.tlb
Static link library Pgmrs120.lib Pgmrs101.lib
Header files ProGrammar.h
PgmrEnums.h
ProGrammar.h

Since the name of the parse engine has changed, it should not conflict with earlier versions of the parser that are already deployed with your application.


Re-Distributable Files

In addition to the binary grammar (.GMR) files that you build in the ProGramamr IDE, you also need to deploy the parse engine component with your application. The following table shows which files need to be distributed, depending on how your application calls the parse engine component.

Component Distribute
these files
Notes
Dynamic link library Pgmr120.dll This file should be placed in the user's Windows directory.
ActiveX component PgmrX120.dll
Pgmr120.dll
The ActiveX component can reside anywhere on the user's system; however, it must be registered with Windows. You can register the component by running the following command at the MS-DOS prompt:

     regsvr32 pgmrX120.dll

When deploying the ActiveX component, you must also distribute Pgmr120.dll and place it in the user's Windows directory.

Static link library   If the parse engine is statically linked to your application, then you don't need to distribute any of the ProGrammar libraries.


Support for Unicode

ProGrammar Version 1.2 supports Unicode in the IDE, the grammar definition language (GDL), and the API.

Unicode and the IDE
The parse tree viewer, debugger, and other viewers have been updated to correctly display Unicode text.
When you open a Unicode file in the IDE, ProGrammar will append the tag "(unicode)" after the filename in the title bar, indicating that it recognizes that the file contains Unicode.
Version 1.2 opens all Unicode files in "read-only" mode. Hence, you'll need to modify Unicode samples using an external editor program such as Notepad. In a future release, you'll be able to edit Unicode files directly from within the ProGrammar IDE.

Unicode and GDL
The predefined symbols have been extended to include Unicode characters. For example, the alpha symbol now includes à, â, å, è, ê, ì, etc.
Within regular expressions, you can define a Unicode character using the notation '\uFFFF'. For example:
  // unicode newline
  newline ::= '\u00D0'; 

  // range of unicode characters
  unicode_range ::= '[\u00A0-\u00FF]+';  

  // string of unicode characters
  unicode_string ::= '\u00A1\u00A2\u00D0\u00A0';
The parser interprets each Unicode character, specified using the \u notation (e.g., '\u00D0'), as a single character, which it compares to a single character from the input stream during the parse. Keep in mind that input characters could be ASCII or Unicode, depending upon the contents of the input stream. However, the parser always compares characters to characters, allowing ASCII strings to be compared to Unicode strings, and vice-versa. In other words, the parser considers the characters '\xD0' and '\u00D0' to be equivalent, and will match them successfully.
At this time, the '\u' and '\x' notations can be used in regular expressions, but not within double-quoted literals.

Unicode and the API
The ProGrammar API has been extended to include wide-string variations of several methods, which will be selected by the linker when your application is built in _UNICODE mode. The following methods have been added:
int      SetGrammar      (const wchar_t* GrammarPathName);
long     GetSymbolID     (const wchar_t* SymbolName);
int      SetInputString  (const wchar_t* InputString);
int      SetInputFilename(const wchar_t* PathName);
long     StartSearch     (const wchar_t* SearchPattern, long StartNodeID);
long     Find            (const wchar_t* SearchPattern, long StartNodeID);
PGString GetErrorDetail  (short ErrorIndex, const wchar_t* DetailName);
int      LoadFromCache   (const wchar_t* CachePathName);
int      SaveToCache     (const wchar_t* CachePathName);
A new API method named SetInputMode allows your application to specify the character type of the input stream (when known). Its signature is:
    void SetInputMode (PGTextFlags textFlags);
Where PGTextFlags can be any of the following values:

pgTextAscii Input stream contains ASCII characters
pgTextUnicode Input stream contains Unicode characters
pgTextAutoDetect The parser should automatically detect
the contents of the input stream
Method SetInputString sets the input mode automatically, based upon which version of the method was called. The ASCII version of SetInputString sets the text flag to pgTextAscii, while the wide string version sets it to pgTextUnicode. You can override this behaviour by calling SetInputMode explicitly after each call to SetInputString.



For comments or questions about this site, please contact
webmaster@programmar.com
Copyright © 1998-2008 NorKen Technologies, Inc. All rights reserved.