代码搜索结果

找到约 10,000 项符合 G 的代码

grammarfilter.g

lexer grammar GrammarFilter; options { language=ObjC; filter=true; } @ivars { id delegate; } @methodsdecl { - (void) setDelegate:(id)theDelegate; } @methods { - (void) setDelegate:(id)theDelega

javadoc.g

grammar Javadoc; options { language=Python; } comment : ( author )* ; author : '@author' ID {print "author "+$ID.text} ; ID : ('a'..'z'|'A'..'Z')+ ; SIMPLE : '{'

simple.g

grammar Simple; options { language=Python; } tokens { RCURLY='}'; } @lexer::header { JAVADOC_CHANNEL = 1 } @lexer::init { self.nesting = 0 } /** This example is meant to illustrate how ANTLR

fuzzyjava.g

lexer grammar FuzzyJava; options { language=Python; filter=true; } IMPORT : 'import' WS name=QIDStar WS? ';' ; /** Avoids having "return foo;" match as a field */ RETURN : 'return' (opti

t.g

/** Demonstrates how semantic predicates get hoisted out of the rule in * which they are found and used in other decisions. This grammar illustrates * how predicates can be used to distinguish b

langdumpdecl.g

tree grammar LangDumpDecl; options { language=Python; tokenVocab=Lang; ASTLabelType = Tree; } decl : ^(DECL type declarator) // label.start, label.start, label.text {print "

lang.g

grammar Lang; options { language=Python; output=AST; ASTLabelType=CommonTree; } tokens {DECL;} // an imaginary node start : decl ; decl : type ID ';' -> ^(DECL type ID) ; type : INTTYPE

calculator.g

grammar Calculator; options { language = Python; } @header { import math } evaluate returns [result]: r=expression {result = r}; expression returns [result]: r=mult ( '+' r2=mult {r += r2}

c.g

/** ANSI C ANTLR v3 grammar Translated from Jutta Degener's 1995 ANSI C yacc grammar by Terence Parr July 2006. The lexical rules were taken from the Java grammar. Jutta says: "In 1985, Jeff Lee pu

symtabtest.g

grammar SymtabTest; options { language=Python; } /* Scope of symbol names. Both globals and block rules need to push a new * symbol table upon entry and they must use the same stack. So, I mu