MarpaX::Languages::C::Scan - C::Scan-like interface
version 0.37
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);
This modules returns a grammar dependant C::Scan-like interface. Current grammars are:
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.
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, with GNU and MSVS extensions. This is the default value.
Please refer to per-grammar documentation for other options and methods.
MarpaX::Languages::C::AST::Grammar::ISO_ANSI_C_2011::Scan
Jean-Damien Durand <jeandamiendurand@free.fr>
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.
To install MarpaX::Languages::C::AST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::Languages::C::AST
CPAN shell
perl -MCPAN -e shell install MarpaX::Languages::C::AST
For more information on module installation, please visit the detailed CPAN module installation guide.