Package net.sf.laja.parser.engine2

Examples of net.sf.laja.parser.engine2.Index


public class StringSourceTest {
 
  @Test
  public void errorInLineOne() {
    StringSource stringSource = new StringSource("12345\n6789");
   
    final int index = 0;
    SourceLine sourceLine = stringSource.getSourceLine(index);
    SourceLine expectedLine = new SourceLine(1, 1, index, "12345", "^");
   
    assertEquals(expectedLine, sourceLine);
  }
View Full Code Here


    assertEquals(expectedLine, sourceLine);
  }

  @Test
  public void errorInLineTwo() {
    StringSource stringSource = new StringSource("1\r\n2345\r\n67");
   
    final int index = 4;
    SourceLine sourceLine = stringSource.getSourceLine(index);
    SourceLine expectedLine = new SourceLine(2, 2, index, "2345", " ^");
   
    assertEquals(expectedLine, sourceLine);
  }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

    return parse(new FileSource(filename));
  }

  // parse URL
  public ParsingResult parseURL(String url) throws ParserException {
    return parse(new URLSource(url));
  }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

    int ni = shape[0];
    int nj = shape[1];
    int nk = shape[2];

    array = new ArrayDouble.D3(ni, nj, nk);
    Index index = array.getIndex();

    for (int i = 0; i < ni; i++) {
      for (int j = 0; j < nj; j++) {
        for (int k = 0; k < nk; k++) {
          index.set(i, j, k);
          double d = pertArray.getDouble(index)
              + baseArray.getDouble(index);
          if (isZStag) {
            d = d / 9.81//convert geopotential to height
          }
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.engine2.Index

Copyright © 2018 www.massapicom. 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.