Package org.jwall.log.io

Examples of org.jwall.log.io.ParserGenerator$Token


    }
   
    @Test
    public void testParseGrammar() throws Exception {
        String grammar = "%{REQUEST_HEADERS:Host} %{VHOST_NAME} %{REMOTE_ADDR} %{REMOTE_USER} %{TMP} [%{DATE}] \"%{REQUEST_METHOD} %{REQUEST_URI} %{PROTO}\" %{RESPONSE_STATUS} %{RESPONSE_SIZE} \"%{REQUEST_HEADERS:Referer}\" \"%{REQUEST_HEADERS:User-Agent}\"";
        ParserGenerator gen = new ParserGenerator( grammar );
        List<String> grams = gen.parseGrammar( grammar );
        int i = 0;
        for( String g : grams ){
            log.info( "{}: '{}'", i++, g );
        }
    }
View Full Code Here


     
     
      String grammar = "[%{BEGIN} - %{END}]";
      String input = "[-3.4 - 8.43]";
     
      ParserGenerator gen = new ParserGenerator( grammar );
     
      Parser<Map<String,String>> parser = gen.newParser();
      Map<String,String> data = parser.parse( input );
     
      for( String key : data.keySet() ){
        System.out.println( key + " = " + data.get( key ) );
      }
View Full Code Here

        client.listTenants(fakeToken);
    }

    private KeystoneAuthenticationToken buildFakeToken(String tokenCode) {
        Access auth = new Access();
        Token tokenObject = new Token();
        tokenObject.setId(tokenCode);
        auth.setToken(tokenObject);
        return new KeystoneAuthenticationToken(auth);
    }
View Full Code Here

TOP

Related Classes of org.jwall.log.io.ParserGenerator$Token

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.