OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 8523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8534 yylval->string.length = result - start; | 8534 yylval->string.length = result - start; |
8535 } | 8535 } |
8536 break; | 8536 break; |
8537 } | 8537 } |
8538 | 8538 |
8539 case CharacterSlash: | 8539 case CharacterSlash: |
8540 // Ignore comments. They are not even considered as white spaces. | 8540 // Ignore comments. They are not even considered as white spaces. |
8541 if (*m_currentCharacter == '*') { | 8541 if (*m_currentCharacter == '*') { |
8542 ++m_currentCharacter; | 8542 ++m_currentCharacter; |
8543 while (m_currentCharacter[0] != '*' || m_currentCharacter[1] != '/')
{ | 8543 while (m_currentCharacter[0] != '*' || m_currentCharacter[1] != '/')
{ |
8544 if (m_currentCharacter[0] == '\n') | 8544 if (*m_currentCharacter == '\n') |
8545 ++m_lineNumber; | 8545 ++m_lineNumber; |
8546 if (m_currentCharacter[0] == '\0' && m_currentCharacter[1] == '\
0') { | 8546 if (*m_currentCharacter == '\0') { |
8547 // Unterminated comments are simply ignored. | 8547 // Unterminated comments are simply ignored. |
8548 m_currentCharacter -= 2; | 8548 m_currentCharacter -= 2; |
8549 break; | 8549 break; |
8550 } | 8550 } |
8551 ++m_currentCharacter; | 8551 ++m_currentCharacter; |
8552 } | 8552 } |
8553 m_currentCharacter += 2; | 8553 m_currentCharacter += 2; |
8554 goto restartAfterComment; | 8554 goto restartAfterComment; |
8555 } | 8555 } |
8556 break; | 8556 break; |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9336 { | 9336 { |
9337 // The tokenizer checks for the construct of an+b. | 9337 // The tokenizer checks for the construct of an+b. |
9338 // However, since the {ident} rule precedes the {nth} rule, some of those | 9338 // However, since the {ident} rule precedes the {nth} rule, some of those |
9339 // tokens are identified as string literal. Furthermore we need to accept | 9339 // tokens are identified as string literal. Furthermore we need to accept |
9340 // "odd" and "even" which does not match to an+b. | 9340 // "odd" and "even" which does not match to an+b. |
9341 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 9341 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
9342 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 9342 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
9343 } | 9343 } |
9344 | 9344 |
9345 } | 9345 } |
OLD | NEW |