Examples of ParserContext


Examples of com.dci.intellij.dbn.language.common.element.parser.ParserContext

        return parse(rootElementType, builder, defaultParseRootId);
    }

    @NotNull
    public ASTNode parse(IElementType rootElementType, PsiBuilder psiBuilder, String parseRootId) {
        ParserContext context = new ParserContext(psiBuilder, languageDialect);
        ParserBuilder builder = context.getBuilder();
        if (parseRootId == null ) parseRootId = defaultParseRootId;
        builder.setDebugMode(SettingsUtil.isDebugEnabled);
        PsiBuilder.Marker marker = builder.mark(null);
        NamedElementType root =  elementTypes.getNamedElementType(parseRootId);
        if (root == null) {
View Full Code Here

Examples of com.google.caja.parser.ParserContext

      for (File f : inputs) {
        try {
          if (f.getName().endsWith(".env.json")) {
            loadEnvJsonFile(f, optimizer, mq);
          } else {
            ParseTreeNode parsedInput = new ParserContext(mq)
            .withInput(new InputSource(f.getCanonicalFile().toURI()))
            .withConfig(meta)
            .build();
            if (parsedInput != null) {
              optimizer.addInput((Statement) parsedInput);
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

     * @deprecated Use {@link #getBlockFactory()} and {@link BlockFactory#parseFromInput(String, ParserContext)}
     */
    @SuppressWarnings("deprecation")
    @Deprecated
    public BaseBlock getBlock(Player player, String arg, boolean allAllowed, boolean allowNoData) throws WorldEditException {
        ParserContext context = new ParserContext();
        context.setActor(player);
        context.setWorld(player.getWorld());
        context.setSession(getSession(player));
        context.setRestricted(!allAllowed);
        context.setPreferringWildcard(allowNoData);
        return getBlockFactory().parseFromInput(arg, context);
    }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

     * @deprecated Use {@link #getPatternFactory()} and {@link BlockFactory#parseFromInput(String, ParserContext)}
     */
    @Deprecated
    @SuppressWarnings("deprecation")
    public Pattern getBlockPattern(Player player, String input) throws WorldEditException {
        ParserContext context = new ParserContext();
        context.setActor(player);
        context.setWorld(player.getWorld());
        context.setSession(getSession(player));
        return Patterns.wrap(getPatternFactory().parseFromInput(input, context));
    }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

     * @deprecated Use {@link #getMaskFactory()} ()} and {@link MaskFactory#parseFromInput(String, ParserContext)}
     */
    @Deprecated
    @SuppressWarnings("deprecation")
    public Mask getBlockMask(Player player, LocalSession session, String input) throws WorldEditException {
        ParserContext context = new ParserContext();
        context.setActor(player);
        context.setWorld(player.getWorld());
        context.setSession(session);
        return Masks.wrap(getMaskFactory().parseFromInput(input, context));
    }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

                if (component.length() > 1) {
                    return Masks.negate(getBlockMaskComponent(masks, component.substring(1), context));
                }

            default:
                ParserContext tempContext = new ParserContext(context);
                tempContext.setRestricted(false);
                tempContext.setPreferringWildcard(true);
                return new BlockMask(extent, worldEdit.getBlockFactory().parseFromListInput(component, tempContext));
        }
    }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

    @BindingMatch(type = BaseBlock.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public BaseBlock getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
                parserContext.setWorld((World) extent);
            }
        }
        parserContext.setSession(worldEdit.getSessionManager().get(actor));
        try {
            return worldEdit.getBlockFactory().parseFromInput(context.next(), parserContext);
        } catch (NoMatchException e) {
            throw new ParameterException(e.getMessage(), e);
        }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

    @BindingMatch(type = Pattern.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public Pattern getPattern(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
                parserContext.setWorld((World) extent);
            }
        }
        parserContext.setSession(worldEdit.getSessionManager().get(actor));
        try {
            return worldEdit.getPatternFactory().parseFromInput(context.next(), parserContext);
        } catch (NoMatchException e) {
            throw new ParameterException(e.getMessage(), e);
        }
View Full Code Here

Examples of com.sk89q.worldedit.extension.input.ParserContext

    @BindingMatch(type = Mask.class,
                  behavior = BindingBehavior.CONSUMES,
                  consumedCount = 1)
    public Mask getMask(ArgumentStack context) throws ParameterException, WorldEditException {
        Actor actor = context.getContext().getLocals().get(Actor.class);
        ParserContext parserContext = new ParserContext();
        parserContext.setActor(context.getContext().getLocals().get(Actor.class));
        if (actor instanceof Entity) {
            Extent extent = ((Entity) actor).getExtent();
            if (extent instanceof World) {
                parserContext.setWorld((World) extent);
            }
        }
        parserContext.setSession(worldEdit.getSessionManager().get(actor));
        try {
            return worldEdit.getMaskFactory().parseFromInput(context.next(), parserContext);
        } catch (NoMatchException e) {
            throw new ParameterException(e.getMessage(), e);
        }
View Full Code Here

Examples of com.sun.xml.internal.xsom.impl.parser.ParserContext

    *
    * @param   parser
    *      This parser will be called to parse XML Schema documents.
    */
    public XSOMParser(XMLParser parser) {
        context = new ParserContext(this,parser);
    }
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.