Пример #1
0
 private void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     failLineNumber   = args.Token.Location.LineNr;
     failColumnNumber = args.Token.Location.ColumnNr;
     failLength       = args.Token.Text.Length;
     failCategory     = "Lexical Error";
     failMessage      = "'" + args.Token.ToString() + "'" + Environment.NewLine +
                        "Line " + (failLineNumber + 1) + ", Column " + (failColumnNumber + 1) + ", Length " + failLength + Environment.NewLine;
 }
Пример #2
0
 private void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     AddViewItem("Token error", args.Token.Location, "Cannot recognize token",
                 args.Token.Text, "", 5);
     errors++;
     if (errors <= maxerrors)
     {
         args.Continue = true;
     }
 }
 private void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     throw new TokenException(args);
 }
Пример #4
0
 /**
  * Listener to set the parse error so it can be surfaced to the caller.
  */
 private void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     this.error = "Token error with input: '" + args.Token.ToString() + "'";
 }
Пример #5
0
 private void lalrParser_OnTokenError(LALRParser parser, TokenErrorEventArgs e)
 {
     // Ignore token errors
     OnParseComplete(EventArgs.Empty);
 }
Пример #6
0
 void _Parser_OnTokenError(LALRParser parser, TokenErrorEventArgs args)
 {
     Errors.Add("Token error: '" + args.Token.ToString() + "'");
     args.Continue = false;
 }
 private void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     //throw new com.calitha.goldparser.toTokenException(args);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="args"></param>
 public TokenException(TokenErrorEventArgs args)
 {
     this.tokenList = args.Token.Text;
 }
Пример #9
0
 public void TokenErrorEvent(LALRParser parser, TokenErrorEventArgs args)
 {
     outputBox.AppendText("token error\n");
 }