OLD | NEW |
---|---|
1 # | 1 # |
2 # KDOM IDL parser | 2 # KDOM IDL parser |
3 # | 3 # |
4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> | 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> |
5 # | 5 # |
6 # This library is free software; you can redistribute it and/or | 6 # This library is free software; you can redistribute it and/or |
7 # modify it under the terms of the GNU Library General Public | 7 # modify it under the terms of the GNU Library General Public |
8 # License as published by the Free Software Foundation; either | 8 # License as published by the Free Software Foundation; either |
9 # version 2 of the License, or (at your option) any later version. | 9 # version 2 of the License, or (at your option) any later version. |
10 # | 10 # |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 my $self = shift; | 226 my $self = shift; |
227 $self->{Token} = $self->{NextToken}; | 227 $self->{Token} = $self->{NextToken}; |
228 $self->{NextToken} = $self->getTokenInternal(); | 228 $self->{NextToken} = $self->getTokenInternal(); |
229 return $self->{Token}; | 229 return $self->{Token}; |
230 } | 230 } |
231 | 231 |
232 my $whitespaceTokenPattern = '^[\t\n\r ]*[\n\r]'; | 232 my $whitespaceTokenPattern = '^[\t\n\r ]*[\n\r]'; |
233 my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?| [0-9]+[Ee][+-]?[0-9]+))'; | 233 my $floatTokenPattern = '^(-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?| [0-9]+[Ee][+-]?[0-9]+))'; |
234 my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)'; | 234 my $integerTokenPattern = '^(-?[1-9][0-9]*|-?0[Xx][0-9A-Fa-f]+|-?0[0-7]*)'; |
235 my $stringTokenPattern = '^(\"[^\"]*\")'; | 235 my $stringTokenPattern = '^(\"[^\"]*\")'; |
236 my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z]*)'; | 236 my $identifierTokenPattern = '^([A-Z_a-z][0-9A-Z_a-z-]*)'; |
haraken
2014/01/08 10:45:38
This isn't a right change.
The Web IDL grammar sa
sof
2014/01/08 10:50:12
Either the "identifier" syntactic category is reus
Nils Barth (inactive)
2014/01/08 11:28:29
To concur with haraken:
AFAICT, we want this to ho
| |
237 my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])'; | 237 my $otherTokenPattern = '^(::|\.\.\.|[^\t\n\r 0-9A-Z_a-z])'; |
238 | 238 |
239 sub getTokenInternal | 239 sub getTokenInternal |
240 { | 240 { |
241 my $self = shift; | 241 my $self = shift; |
242 | 242 |
243 if ($self->{DocumentContent} =~ /$whitespaceTokenPattern/) { | 243 if ($self->{DocumentContent} =~ /$whitespaceTokenPattern/) { |
244 $self->{DocumentContent} =~ s/($whitespaceTokenPattern)//; | 244 $self->{DocumentContent} =~ s/($whitespaceTokenPattern)//; |
245 my $skipped = $1; | 245 my $skipped = $1; |
246 $self->{LineNumber}++ while ($skipped =~ /\n/g); | 246 $self->{LineNumber}++ while ($skipped =~ /\n/g); |
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2211 $customConstructor->overloadedIndex($index++); | 2211 $customConstructor->overloadedIndex($index++); |
2212 push(@{$interface->customConstructors}, $customConstructor); | 2212 push(@{$interface->customConstructors}, $customConstructor); |
2213 } | 2213 } |
2214 delete $extendedAttributeList->{"CustomConstructors"}; | 2214 delete $extendedAttributeList->{"CustomConstructors"}; |
2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; | 2215 $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING"; |
2216 } | 2216 } |
2217 $interface->extendedAttributes($extendedAttributeList); | 2217 $interface->extendedAttributes($extendedAttributeList); |
2218 } | 2218 } |
2219 | 2219 |
2220 1; | 2220 1; |
OLD | NEW |