Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0ee401193c488ee149a1e6d3b26dca528040e528 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
-----------------------------------------------------------------------------------
-- Copyright (c) 2006, 2008 IBM Corporation and others.
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v1.0
-- which accompanies this distribution, and is available at
-- http://www.eclipse.org/legal/epl-v10.html
--
-- Contributors:
--     IBM Corporation - initial API and implementation
-----------------------------------------------------------------------------------

%options la=2
%options package=org.eclipse.cdt.internal.core.dom.lrparser.gcc
%options template=FixedBtParserTemplateD.g


-- For this to work the environment variable LPG_INCLUDE must be set up
-- to point at the directory where the C99Parser.g file is located.
$Import
	../c99/C99Parser.g
$End

$Import
    ../gnu/GNUExtensions.g
$End


-- Tokens used by GCC but not part of the C99 spec
$Terminals

    asm
    
$End


-- Hook the extensions into the main grammar.
$Rules


no_type_declaration_specifier
    ::= attribute_or_decl_specifier

complete_declarator
    ::= attribute_or_decl_specifier_seq declarator
      | declarator attribute_or_decl_specifier_seq
      | attribute_or_decl_specifier_seq declarator attribute_or_decl_specifier_seq

complete_struct_declarator
    ::= attribute_or_decl_specifier_seq struct_declarator
      | struct_declarator attribute_or_decl_specifier_seq
      | attribute_or_decl_specifier_seq struct_declarator attribute_or_decl_specifier_seq
    
enum_specifier_hook
    ::= attribute_or_decl_specifier_seq

struct_or_union_specifier_hook
    ::= attribute_or_decl_specifier_seq
    
struct_or_union_specifier_suffix_hook
    ::= attribute_or_decl_specifier_seq

pointer_hook
    ::= attribute_or_decl_specifier_seq 

elaborated_specifier_hook
    ::= attribute_or_decl_specifier_seq


$End

Back to the top