Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Lexer (0.06 sec)

  1. internal/s3select/sql/parser_test.go

    package sql
    
    import (
    	"bytes"
    	"testing"
    
    	"github.com/alecthomas/participle"
    	"github.com/alecthomas/participle/lexer"
    )
    
    func TestJSONPathElement(t *testing.T) {
    	p := participle.MustBuild(
    		&JSONPathElement{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    		participle.CaseInsensitive("Timeword"),
    	)
    
    	j := JSONPathElement{}
    	cases := []string{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/BasicJavadocLexerTest.groovy

            when:
            lexer.pushText("a << b")
            lexer.visit(visitor)
    
            then:
            1 * visitor.onText('a << b')
            1 * visitor.onEnd()
            0 * visitor._
        }
    
        def javadocTagCanContainEOLChars() {
            when:
            lexer.pushText(" * {@link #Something(Object,\n * String\n * }")
            lexer.visit(visitor)
    
            then:
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6K bytes
    - Viewed (0)
  3. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexer.java

     */
    public class HtmlToXmlJavadocLexer implements JavadocLexer {
        private final JavadocLexer lexer;
        private final Set<String> blockElements = new HashSet<String>();
        private final Set<String> blockContent = new HashSet<String>();
    
        public HtmlToXmlJavadocLexer(JavadocLexer lexer) {
            this.lexer = lexer;
            blockElements.add("p");
            blockElements.add("pre");
            blockElements.add("ul");
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 5.8K bytes
    - Viewed (0)
  4. src/cmd/asm/main.go

    			flags.D = append(flags.D, "GOEXPERIMENT_"+exp)
    		}
    	}
    
    	var ok, diag bool
    	var failedFile string
    	for _, f := range flag.Args() {
    		lexer := lex.NewLexer(f)
    		parser := asm.NewParser(ctxt, architecture, lexer)
    		ctxt.DiagFunc = func(format string, args ...interface{}) {
    			diag = true
    			log.Printf(format, args...)
    		}
    		if *flags.SymABIs {
    			ok = parser.ParseSymABIs(buf)
    		} else {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Jun 21 19:58:04 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/JavadocLexer.java

     * limitations under the License.
     */
    package gradlebuild.docs.dsl.docbook;
    
    public interface JavadocLexer {
        /**
         * Visits the tokens in the input stream for this lexer. Reads to the end of the input.
         */
        void visit(TokenVisitor visitor);
    
        class TokenVisitor {
            void onStartHtmlElement(String name) {
            }
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 1.3K bytes
    - Viewed (0)
  6. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexerTest.groovy

            "text<h2>header</h2>text"   | "<p>text</p><h2>header</h2><p>text</p>"
        }
    
        def parse(String source) {
            def lexer = new HtmlToXmlJavadocLexer(new BasicJavadocLexer(new JavadocScanner(source)))
            def result = new StringBuilder()
            lexer.visit(new JavadocLexer.TokenVisitor() {
                @Override
                void onStartHtmlElement(String name) {
                    result.append("<$name")
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 6.5K bytes
    - Viewed (0)
  7. internal/s3select/sql/jsonpath_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	b, err := io.ReadAll(f)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	p := participle.MustBuild(
    		&JSONPath{},
    		participle.Lexer(sqlLexer),
    		participle.CaseInsensitive("Keyword"),
    	)
    	cases := []struct {
    		str string
    		res []interface{}
    	}{
    		{"s.title", []interface{}{"Murder on the Orient Express", "The Robots of Dawn", "Pigs Have Wings"}},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/lex/lex.go

    		return "string constant"
    	case scanner.RawString:
    		return "raw string constant"
    	case scanner.Comment:
    		return "comment"
    	default:
    		return fmt.Sprintf("%q", rune(t))
    	}
    }
    
    // NewLexer returns a lexer for the named file and the given link context.
    func NewLexer(name string) TokenReader {
    	input := NewInput(name)
    	fd, err := os.Open(name)
    	if err != nil {
    		log.Fatalf("%s\n", err)
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Aug 29 18:31:05 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top