Examples of Parser


Examples of com.joestelmach.natty.Parser

    public Result parse(final String string) throws DateNotParsableException {
        Date from = null;
        Date to = null;

        final Parser parser = new Parser(UTC);
        final List<DateGroup> groups = parser.parse(string);
        if (!groups.isEmpty()) {
            final List<Date> dates = groups.get(0).getDates();

            if (dates.size() >= 1) {
                from = dates.get(0);
View Full Code Here

Examples of com.l2jfrozen.gameserver.script.Parser

    }

    Node node = script.getDocument().getFirstChild();
    String parserClass = "faenor.Faenor" + node.getNodeName() + "Parser";

    Parser parser = null;
    try
    {
      parser = createParser(parserClass);
    }
    catch(ParserNotCreatedException e)
    {
      _log.warning("ERROR: No parser registered for Script: " + parserClass);
      e.printStackTrace();
    }

    if(parser == null)
    {
      _log.warning("Unknown Script Type: " + script.getName());
      return;
    }

    try
    {
      parser.parseScript(node, context);
      _log.fine(script.getName() + "Script Sucessfullty Parsed.");
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

Examples of com.nick125.thingamabob.parser.Parser

        JFileChooser chooser = new JFileChooser();
        chooser.setFileFilter(new TSingleFileFilter("midl",
              "Machine Instruction Description Language (.midl)"));
        int status = chooser.showOpenDialog(TWindow.this);
        if (status == JFileChooser.APPROVE_OPTION) {
          Parser parser = new Parser();
          try {
            SimpleInstSet<String> instructionSet = parser
              .parseStream(new FileReader(chooser
                    .getSelectedFile()));
            TWindow.this.machine
              .setInstructionSet(instructionSet);
            TWindow.this.statusBar.setNotificationArea(String.format(
View Full Code Here

Examples of com.pogofish.jadt.parser.Parser

    /**
     * Test the whole shebang with a minimal document
     */
    @Test
    public void testMinimal() {
        final Parser parser = new StandardParser(PARSER_IMPL_FACTORY);
        final ParseResult result = parser.parse(new StringSource("ParserTest",
                "Foo = Foo"));

        assertEquals(new ParseResult(new Doc("ParserTest", EMPTY_PKG, NO_IMPORTS, list(_DataType(NO_COMMENTS, NO_ANNOTATIONS, "Foo", NO_FORMAL_TYPE_ARGUMENTS, NO_EXTENDS, NO_IMPLEMENTS,
                list(_Constructor(NO_COMMENTS, "Foo", Util.<Arg> list()))))), Util.<SyntaxError>list()), result);
    }
View Full Code Here

Examples of com.redspr.redquerybuilder.core.client.command.Parser

import com.redspr.redquerybuilder.core.shared.meta.Table;

public class GwtTestBasics extends AbstractTest {
    @Test
    public void testComparison() throws Exception {
        Parser p = new Parser(getSession());
        Comparison c = (Comparison) p.parseExpression("id = ?");
        ExpressionColumn left = (ExpressionColumn) c.getLeft();
        Parameter param = (Parameter) c.getRight();
    }
View Full Code Here

Examples of com.sun.enterprise.admin.cli.Parser

            throw new CommandException("Command lookup failed for command " + command);
        }

        // Filter out the global options.
        // We are interested only in --passwordfile option. No other options are relevant when GlassFish is running in embedded mode.
        Parser parser = new Parser(args, 0, ProgramOptions.getValidOptions(), true);
        ParameterMap globalOptions = parser.getOptions();
        List<String> operands = parser.getOperands();
        String argv[] = operands.toArray(new String[operands.size()]);

        parser = new Parser(argv, 0, commandModel.getParameters(), false);
        ParameterMap options = parser.getOptions();
        operands = parser.getOperands();
        options.set("DEFAULT", operands);
        // if command has a "terse" option, set it in options
        if (commandModel.getModelFor("terse") != null)
            options.set("terse", Boolean.toString(terse));
View Full Code Here

Examples of com.sun.hotspot.igv.data.serialization.Parser

                    public void setState(String state) {
                        setProgress(0.0);
                        handle.progress(state);
                    }
                };
                final Parser parser = new Parser();
                final OutlineTopComponent component = OutlineTopComponent.findInstance();

                component.requestActive();

                RequestProcessor.getDefault().post(new Runnable() {

                    public void run() {
                        GraphDocument document = null;
                        try {
                            document = parser.parse(reader, is, parseMonitor);
                            parseMonitor.setState("Finishing");
                            component.getDocument().addGraphDocument(document);
                        } catch (SAXException ex) {
                            String s = "Exception during parsing the XML file, could not load document!";
                            if (ex instanceof XMLParser.MissingAttributeException) {
View Full Code Here

Examples of com.sun.java.help.impl.Parser

      tagStack = new Stack();
      defaultLocale = hs.getLocale();
      lastLocale = defaultLocale;
      myHS = hs;
      myHSLocale = hs.getLocale();
      Parser parser = new Parser(src); // the XML parser instance
      parser.addParserListener(this);
      parser.parse();
  }
View Full Code Here

Examples of com.sun.tools.javac.parser.Parser

        JavaFileObject prev = compiler.log.useSource(null);
        ParserFactory parserFactory = ParserFactory.instance(context);
        Attr attr = Attr.instance(context);
        try {
            CharBuffer buf = CharBuffer.wrap((expr+"\u0000").toCharArray(), 0, expr.length());
            Parser parser = parserFactory.newParser(buf, false, false, false);
            JCTree tree = parser.parseType();
            return attr.attribType(tree, (Symbol.TypeSymbol)scope);
        } finally {
            compiler.log.useSource(prev);
        }
    }
View Full Code Here

Examples of com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver.Parser

                                                     @NotNull QName serviceName, @NotNull QName portName, Container container) {
        URL wsdlUrl = primaryWsdl.getSystemId();
        try {
            // TODO: delegate to another entity resolver
            WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(
                new Parser(primaryWsdl), new EntityResolverImpl(metadata),
                    false, container, ServiceFinder.find(WSDLParserExtension.class).toArray());
            if(wsdlDoc.getServices().size() == 0) {
                throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(wsdlUrl));
            }
            WSDLServiceImpl wsdlService = wsdlDoc.getService(serviceName);
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.