Home | History | Annotate | Download | only in test

Lines Matching defs:Grammar

42 class Grammar
202 sprintf( "grammar %s (%s)", @name, @path )
261 @source =~ /^\s*(lexer|parser|tree)?\s*grammar\s*(\S+)\s*;/ or
262 raise Grammar::FormatError[ source, path ]
266 end # class Grammar
268 class Grammar::InlineGrammar < Grammar
300 sprintf( 'inline grammar %s (%s:%s)', name, @host_file, @host_line )
312 end # class Grammar::InlineGrammar
314 class Grammar::CompilationFailure < StandardError
316 attr_reader :grammar, :command, :status, :output
318 def initialize( grammar, command, status, output )
323 message = <<-END.here_indent! % [ command, status, grammar, @output ]
332 end # error Grammar::CompilationFailure
334 class Grammar::FormatError < StandardError
346 message << "bad inline grammar source:\n"
351 message << "could not locate a grammar name and type declaration matching\n"
352 message << "/^\s*(lexer|parser|tree)?\s*grammar\s*(\S+)\s*;/"
354 message << 'bad grammar source in file %p' % @file
359 message << "could not locate a grammar name and type declaration matching\n"
360 message << "/^\s*(lexer|parser|tree)?\s*grammar\s*(\S+)\s*;/"
364 end # error Grammar::FormatError