The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MarpaX::Languages::C::Scan - C::Scan-like interface

VERSION

version 0.37

SYNOPSIS

    use MarpaX::Languages::C::Scan;
    my $cSourceCode = <<C_SOURCE_CODE;

    typedef int myInt_type;
    typedef enum myEnum1_e {X11 = 0, X12} myEnumType1_t, *myEnumType1p_t;
    typedef enum {X21 = 0, X22} myEnumType2_t, *myEnumType2p_t;
    typedef struct myStruct1 {int x;} myStructType1_t, *myStructType1p_t;
    typedef struct {int x;} myStructType2_t, *myStructType2p_t;

    C_SOURCE_CODE
    my $scan = MarpaX::Languages::C::Scan->new(content => $cSourceCode);

DESCRIPTION

This modules returns a grammar dependant C::Scan-like interface. Current grammars are:

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.

SUBROUTINES/METHODS

new($class, grammarName => $grammarName, %options)

Instance a new object. Takes a hash as argument. The entire %options content is forwarded to a per-grammar C::Scan-like implement. Supported grammars are:

ISO-ANSI-C-2011

ISO ANSI C 2011, with GNU and MSVS extensions. This is the default value.

Please refer to per-grammar documentation for other options and methods.

SEE ALSO

MarpaX::Languages::C::AST::Grammar::ISO_ANSI_C_2011::Scan

AUTHOR

Jean-Damien Durand <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.