示例#1
0
 /// <summary> Creates a Terms object for lexing and parsing the operators with names specified in ops,
 /// and for lexing and parsing the keywords case sensitively.
 /// Keywords and operators are lexed as TokenReserved.
 /// Words that are not among the keywords are lexed as TokenWord.
 /// </summary>
 /// <param name="wscanner">the scanner that identifies a word in the language.
 /// </param>
 /// <param name="ops">the operator names.
 /// </param>
 /// <param name="keywords">the keyword names.
 /// </param>
 /// <param name="toWord">the FromString object used to create a token for non-key words recognized by wscanner.
 /// </param>
 /// <returns> the Terms instance.
 /// </returns>
 public static Terms GetCaseSensitiveInstance(Scanner wscanner, string[] ops, string[] keywords,
                                              FromString toWord)
 {
     return(new Terms(Lexers.GetCaseSensitive(wscanner, ops, keywords, toWord)));
 }
示例#2
0
 /// <summary> Creates a Terms object for lexing and parsing the operators with names specified in ops,
 /// and for lexing and parsing the keywords case sensitively.
 /// Keywords and operators are lexed as TokenReserved.
 /// Words that are not among the keywords are lexed as TokenWord.
 /// A word is defined as an alpha numeric string that starts with [_a-zA-Z],
 /// with 0 or more [0-9_a-zA-Z] following.
 /// </summary>
 /// <param name="ops">the operator names.
 /// </param>
 /// <param name="keywords">the keyword names.
 /// </param>
 /// <returns> the Terms instance.
 /// </returns>
 public static Terms GetCaseSensitiveInstance(string[] ops, string[] keywords)
 {
     return(new Terms(Lexers.GetCaseSensitive(ops, keywords)));
 }