NAME

MarpaX::Languages::C::AST::Grammar - C grammar written in Marpa BNF

VERSION

version 0.13

SYNOPSIS

use MarpaX::Languages::C::AST::Grammar;

my $grammar = MarpaX::Languages::C::AST::Grammar->new('ISO-ANSI-C-2011');
my $grammar_content = $grammar->content();
my $grammar_option = $grammar->grammar_option();
my $recce_option = $grammar->recce_option();

DESCRIPTION

This modules returns C grammar(s) written in Marpa BNF. Current grammars are: =over =item * ISO-ANSI-C-2011. The ISO grammar of ANSI C 2011, as of http://www.quut.com/c/ANSI-C-grammar-y-2011.html and http://www.quut.com/c/ANSI-C-grammar-l.html. =back

SUBROUTINES/METHODS

new()

Instance a new object. Takes the name of the grammar as argument.

content()

Returns the content of the grammar.

grammar_option()

Returns recommended option for Marpa::R2::Scanless::G->new(), returned as a reference to a hash.

recce_option()

Returns recommended option for Marpa::R2::Scanless::R->new(), returned as a reference to a hash.

SEE ALSO

Marpa::R2, MarpaX::Languages::C::AST::Grammar::ISO_ANSI_C_2011

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

CONTRIBUTORS

  • Jeffrey Kegler <jkegl@cpan.org>

  • jddurand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.