Package statechum.analysis.learning.rpnicore.LTL_to_ba

Examples of statechum.analysis.learning.rpnicore.LTL_to_ba.Lexer.remaining()


    Lexer lexer = buildLexer(str);
    OtpErlangObject result = parseFirstTermInText(lexer);
    if (lexer.getLastMatchType() >= 0)// did not get to the end of string
      throw new IllegalArgumentException(
          "unexpected characters at the end of string to parse, looking at "
              + lexer.remaining());
    return result;
  }

  protected final static Map<Class<? extends OtpErlangObject>, ErlangParserComponent> classToDumper;
  static {
View Full Code Here


    Lexer lexer = buildLexer(str);
    OtpErlangObject result = parseFirstTermInText(lexer);
    if (lexer.getLastMatchType() >= 0)// did not get to the end of string
      throw new IllegalArgumentException(
          "unexpected characters at the end of string to parse, looking at "
              + lexer.remaining());
    return result;
  }

  protected final static Map<Class<? extends OtpErlangObject>, ErlangParserComponent> classToDumper;
  static {
View Full Code Here

    final String text = "\'this is an atom\' junk and more";
      Lexer lexer = ErlangLabel.buildLexer(text);
      OtpErlangObject result = ErlangLabel.parseFirstTermInText(lexer);
    OtpErlangAtom atom = (OtpErlangAtom)result;
    Assert.assertEquals("\'this is an atom\'",ErlangLabel.dumpErlangObject(atom));
    Assert.assertEquals("junk and more",lexer.remaining());
  }
 
  @Test
  public void testParse1aa()
  {
View Full Code Here

        else
          if (match == ErlangLabel.erlMinus)
            positiveNegative = false;
          else
            if (match != ErlangLabel.erlComma && lexer.getLastMatchType() != ErlangLabel.erlSpaces)
              throw new IllegalArgumentException("a collection of traces should start with either "+cmdPositive+" or "+cmdNegative+", got"+lexer.getMatch()+" in "+lexer.remaining());
        if (positiveNegative != null)
        {
          for(List<Label> sequence:StatechumXML.readSequenceList(ErlangLabel.parseFirstTermInText(lexer),config))
            collector.addTrace(sequence, positiveNegative.booleanValue());
          match = lexer.getLastMatchType();
View Full Code Here

        else
          if (match == ErlangLabel.erlMinus)
            positiveNegative = false;
          else
            if (match != ErlangLabel.erlComma && lexer.getLastMatchType() != ErlangLabel.erlSpaces)
              throw new IllegalArgumentException("a collection of traces should start with either "+cmdPositive+" or "+cmdNegative+", got"+lexer.getMatch()+" in "+lexer.remaining());
        if (positiveNegative != null)
        {
          for(List<Label> sequence:StatechumXML.readSequenceList(ErlangLabel.parseFirstTermInText(lexer),config,null))
            collector.addTrace(sequence, positiveNegative.booleanValue());
          match = lexer.getLastMatchType();
View Full Code Here

    Lexer lexer = buildLexer(str);
    OtpErlangObject result = parseFirstTermInText(lexer);
    if (lexer.getLastMatchType() >= 0)// did not get to the end of string
      throw new IllegalArgumentException(
          "unexpected characters at the end of string to parse, looking at "
              + lexer.remaining());
    return result;
  }

  protected final static Map<Class<? extends OtpErlangObject>, ErlangParserComponent> classToDumper;
  static {
View Full Code Here

              Lexer lexer = ErlangLabel.buildLexer(questionAndResponse);
              OtpErlangObject result = ErlangLabel.parseFirstTermInText(lexer);
              question = statechum.StatechumXML.readInputSequenceFromErlangObject(result,config,converter);
              if (lexer.getLastMatchType() < 0)
                throwEx("question "+questionAndResponse);
              theRestOfResponse = lexer.remaining();
          }
          lex.startParsing(theRestOfResponse);
         
          if (lex.getMatchType() < 0)
            throwEx("setAnswers: cannot parse "+theRestOfResponse);
View Full Code Here

        else
          if (match == ErlangLabel.erlMinus)
            positiveNegative = false;
          else
            if (match != ErlangLabel.erlComma && lexer.getLastMatchType() != ErlangLabel.erlSpaces)
              throw new IllegalArgumentException("a collection of traces should start with either "+cmdPositive+" or "+cmdNegative+", got"+lexer.getMatch()+" in "+lexer.remaining());
        if (positiveNegative != null)
        {
          for(List<Label> sequence:StatechumXML.readSequenceList(ErlangLabel.parseFirstTermInText(lexer),config,converter))
            collector.addTrace(sequence, positiveNegative.booleanValue());
          match = lexer.getLastMatchType();
View Full Code Here

              Lexer lexer = ErlangLabel.buildLexer(questionAndResponse);
              OtpErlangObject result = ErlangLabel.parseFirstTermInText(lexer);
              question = statechum.StatechumXML.readInputSequenceFromErlangObject(result,config);
              if (lexer.getLastMatchType() < 0)
                throwEx("question "+questionAndResponse);
              theRestOfResponse = lexer.remaining();
          }
          lex.startParsing(theRestOfResponse);
         
          if (lex.getMatchType() < 0)
            throwEx("setAnswers: cannot parse "+theRestOfResponse);
View Full Code Here

    Lexer lexer = buildLexer(str);
    OtpErlangObject result = parseFirstTermInText(lexer);
    if (lexer.getLastMatchType() >= 0)// did not get to the end of string
      throw new IllegalArgumentException(
          "unexpected characters at the end of string to parse, looking at "
              + lexer.remaining());
    return result;
  }

  protected final static Map<Class<? extends OtpErlangObject>, ErlangParserComponent> classToDumper;
  static {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.