All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.parser.clang.CPPComment Maven / Gradle / Ivy

package org.unlaxer.parser.clang;

import org.unlaxer.Name;
import org.unlaxer.parser.ChainParsers;
import org.unlaxer.parser.Parser;
import org.unlaxer.parser.Parsers;
import org.unlaxer.parser.combinator.LazyChain;
import org.unlaxer.parser.elementary.LineTerminatorParser;
import org.unlaxer.parser.elementary.WildCardStringTerninatorParser;
import org.unlaxer.parser.elementary.WordParser;

public class CPPComment extends LazyChain{

  // parser for // comment
  public CPPComment() {
    super();
  }

  public CPPComment(Name name) {
    super(name);
  }
  
  @Override
  public Parsers getLazyParsers() {
    return new ChainParsers(
      new WordParser("//"),
      new WildCardStringTerninatorParser(true,Parser.get(LineTerminatorParser.class))
    );
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy