Lines Matching defs:new

38 RecognizerSharedState = Struct.new( 
137 Block = Scope.new( "name", "depth = 0", "variables = {}" )
138 Block.new # => #<struct Block name=nil, depth=0, variables={}>
139 Block.new( "function" ) # => #<struct Block name="function", depth=0, variables={}>
140 Block.new( 'a', 1, :x => 3 ) # => #<struct Block name="a", depth=1, variables={ :x => 3 }>
145 def self.new( *declarations, &body )
245 Struct.new( *members )
262 struct = Struct.new( *return_scope_members )
268 @imported_grammars ||= Set.new
315 Scope.new( *declarations, &body )
355 # Create a new recognizer. The constructor simply ensures that
361 @state = options[ :state ] || RecognizerSharedState.new
780 follow_set = Set.new
862 @state.rule_memory[ rule ] = Hash.new( MEMO_RULE_UNKNOWN )
974 input = ANTLR3::StringStream.new(source, :file => 'blah-de-blah.hyp')
975 lexer = Hypothetical::Lexer.new( input )
976 tokens = ANTLR3::CommonTokenStream.new( lexer )
977 parser = Hypothetical::Parser.new( tokens )
983 lexer = Hypothetical::Lexer.new("some hypothetical source code", :file => 'blah-de-blah.hyp')
984 parser = Hypothetical::Parser.new( lexer )
997 main = ANTLR3::Main::LexerMain.new( self, options )
1182 when ::String then StringStream.new( input, options )
1183 when ::IO, ARGF then FileStream.new( input, options )
1259 main = ANTLR3::Main::ParserMain.new( self, options )
1290 when @input.token_class then @input.token_class.new
1291 else ( create_token rescue CommonToken.new )
1326 when TokenSource then CommonTokenStream.new( input, options )
1329 CommonTokenStream.new( lexer_class.new( input, options ), options )