Package com.caucho.quercus

Examples of com.caucho.quercus.Location


   * Parses the echo statement.
   */
  private void parseEcho(ArrayList<Statement> statements)
    throws IOException
  {
    Location location = getLocation();

    while (true) {
      Expr expr = parseTopExpr();

      createEchoStatements(location, statements, expr);
View Full Code Here


  private Statement parseGlobal()
    throws IOException
  {
    ArrayList<Statement> statementList = new ArrayList<Statement>();

    Location location = getLocation();

    while (true) {
      Expr expr = parseTopExpr();

      if (expr instanceof VarExpr) {
View Full Code Here

  private Statement parseStatic()
    throws IOException
  {
    ArrayList<Statement> statementList = new ArrayList<Statement>();

    Location location = getLocation();

    while (true) {
      expect('$');

      String name = parseIdentifier();
View Full Code Here

   * Parses the unset statement.
   */
  private Statement parseUnset()
    throws IOException
  {
    Location location = getLocation();

    ArrayList<Statement> statementList = new ArrayList<Statement>();
    parseUnset(statementList);

    return _factory.createBlock(location, statementList);
View Full Code Here

   * Parses the unset statement.
   */
  private void parseUnset(ArrayList<Statement> statementList)
    throws IOException
  {
    Location location = getLocation();

    int token = parseToken();

    if (token != '(') {
      _peekToken = token;
View Full Code Here

  {
    boolean oldTop = _isTop;
    _isTop = false;
   
    try {
      Location location = getLocation();

      expect('(');

      _isIfTest = true;
      Expr test = parseExpr();
View Full Code Here

    Statement falseBlock = null;

    int token = parseToken();

    if (token == ELSEIF) {
      Location subLocation = getLocation();

      Expr subTest = parseExpr();
      expect(':');
     
      falseBlock = parseAlternateIf(subTest, subLocation);
View Full Code Here

   * Parses the switch statement
   */
  private Statement parseSwitch()
    throws IOException
  {
    Location location = getLocation();

    boolean oldTop = _isTop;
    _isTop = false;
   
    String label = pushSwitchLabel();

    try {
      expect('(');

      Expr test = parseExpr();

      expect(')');

      boolean isAlternate = false;

      int token = parseToken();

      if (token == ':')
        isAlternate = true;
      else if (token == '{')
        isAlternate = false;
      else {
        _peekToken = token;

        expect('{');
      }

      ArrayList<Expr[]> caseList = new ArrayList<Expr[]>();
      ArrayList<BlockStatement> blockList = new ArrayList<BlockStatement>();

      ArrayList<Integer> fallThroughList = new ArrayList<Integer>();
      BlockStatement defaultBlock = null;

      while ((token = parseToken()) == CASE || token == DEFAULT) {
        Location caseLocation = getLocation();

        ArrayList<Expr> valueList = new ArrayList<Expr>();
        boolean isDefault = false;
           
        while (token == CASE || token == DEFAULT) {
View Full Code Here

    _isTop = false;
   
    String label = pushWhileLabel();

    try {
      Location location = getLocation();

      expect('(');

      _isIfTest = true;
      Expr test = parseExpr();
View Full Code Here

    _isTop = false;

    String label = pushDoLabel();
   
    try {
      Location location = getLocation();

      Statement block = parseStatement();
     
      expect(WHILE);
      expect('(');
View Full Code Here

TOP

Related Classes of com.caucho.quercus.Location

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.