summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/master_lexer.cc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [2534] Support some minor cases for quoted character strings (compatibility ↵Mukund Sivaraman2014-01-221-4/+11
| | | | with BIND 9)
* [master] Merge branch 'trac2573'JINMEI Tatuya2013-01-181-12/+23
|\ | | | | | | | | fixed Conflicts: src/lib/datasrc/zone_loader.cc
| * [2573] changed lexer's getTotalSourceSize/Position with accumulation.JINMEI Tatuya2013-01-121-12/+23
| | | | | | | | | | | | now the size is not decreased when it's popped. on second thought, I think it makes more sense to eventually get more precise estimation of the total progress.
* | [2572] convert OpenError to Unexpected in the stream ver. of pushSource.JINMEI Tatuya2013-01-151-1/+7
|/ | | | | | with the change for #2572 this version can now have this exception, and since it's intended to be hidden within the lexer and input source classes, we need to convert it. doc/tests are also added/updated.
* [2572] adjusted getTotalSourceSize() to handle unknown source sizeJINMEI Tatuya2013-01-111-0/+6
|
* [2572] introduced a special source size of "unknown".JINMEI Tatuya2013-01-111-0/+10
| | | | | this will help handle special cases like using the lexer with stdin associated with a pipe.
* [2572] added MasterLexer::getPosition().JINMEI Tatuya2013-01-101-0/+9
|
* [2572] added MasterLexer::getTotalSourceSize().JINMEI Tatuya2013-01-101-0/+10
|
* [2427] Handling of INITIAL_WS on the first line of included fileMichal 'vorner' Vaner2012-12-181-0/+2
| | | | | Update the warning message to be usable for this case too. Also, explicitly check and fix lexer again for this case.
* [2427] Find INITIAL_WS even at the beginning of fileMichal 'vorner' Vaner2012-12-171-1/+1
|
* Merge #2428Michal 'vorner' Vaner2012-12-141-0/+5
|\ | | | | | | | | | | | | $INCLUDE handling in the isc::dns::MasterLoader Conflicts: src/lib/dns/master_loader.cc
| * [2428] Interface to get count of sources in lexerMichal 'vorner' Vaner2012-12-131-0/+5
| | | | | | | | And use it in the master loader, instead of keeping it separately there.
* | [2382] unify pushing '\0' for number-like data in Number::handle()JINMEI Tatuya2012-12-041-3/+3
|/
* [2382] unrelated fix to lexer: support empty qstring and nul termination.JINMEI Tatuya2012-12-011-3/+10
| | | | | | an empty qstring previously caused an exception, which is a clear bug and should be fixed. nul-terminating string regions is an extension, but I found it useful when implementing RDATA parsers.
* [2506] handle other rare error casesJINMEI Tatuya2012-11-291-4/+7
|
* [2506] handled the case when getNextToken expects a number but it's too big.JINMEI Tatuya2012-11-291-0/+6
|
* [2506] handled the case a number is expected but not foundJINMEI Tatuya2012-11-291-2/+8
|
* [2506] supported NUMBER in getNextToken() with expected typeJINMEI Tatuya2012-11-291-6/+18
|
* [2506] resolved remaining conflicts on rebaseJINMEI Tatuya2012-11-291-2/+2
|
* [2506] added another version of getNextToken, basic partJINMEI Tatuya2012-11-291-0/+28
|
* [2506] rename: MasterLexer::Token to MasterToken.JINMEI Tatuya2012-11-291-26/+23
| | | | | it's a kind of hack for the convenience of the planned change of this branch, but the revised name doesn't seem really bad anyway.
* [2506] removed meaningless commentJINMEI Tatuya2012-11-291-1/+0
| | | | | | | | | | | | this is remaining open point from #2375. The comment was added at commit 33a3143, and it's been the same since the introduction. Aside from the fact that the sentence is incomplete, IMO the comment doesn't provide any meaningful information; it's obvious that "the source is not available" if source_ is NULL. Even if we complete the sentence by adding, e.g, "(then) throw InvalidOperation", it still doesn't provide any additional information than the code itself. So my decision is to to simply clean it up.
* [2374] Some last cleanupsJelte Jansen2012-11-291-4/+4
| | | | | | - reduced a line that was 1 character too long - flipped order of check with isdigit() - renamed Token::NUMBER_RANGE to Token::NUMBER_OUT_OF_RANGE
* [2374] Only recognize numbers if MasterLexer::NUMBER is setJelte Jansen2012-11-281-1/+1
|
* [master] Fix overflow catching in number lexer stateJelte Jansen2012-11-271-6/+13
|
* [master] Fix changes from #2374 to match API changesJelte Jansen2012-11-271-3/+3
|
* [master] Merge branch 'trac2374'Jelte Jansen2012-11-271-3/+55
|\
| * [2374] Comments for end of unnamed namespacesJelte Jansen2012-11-261-3/+3
| |
| * [2374] Use correct type for base of strtoul()Jelte Jansen2012-11-261-1/+1
| |
| * [2374] Fix comments in number tokensJelte Jansen2012-11-261-1/+2
| | | | | | | | a number directly followed by ;comment was not parsed correctly
| * [2374] Add Number lexer stateJelte Jansen2012-11-211-0/+51
| |
* | [2375] Eliminate fake statesMichal 'vorner' Vaner2012-11-221-62/+1
| |
* | [2375] Simplify the state transition design patternMichal 'vorner' Vaner2012-11-221-15/+13
| | | | | | | | | | | | | | | | | | We never have a chain of the transitions. We only do start and zero or one handle on the returned one. Simplify handle to return void, not NULL. Besides simplification, it allows testing without fake states (TBD) - we had no real state to test the multiple transitions.
* | [2375] some style matters: mostly about constness, and folded a long line.JINMEI Tatuya2012-11-221-3/+3
| | | | | | | | | | Conflicts (from cherry-pick): src/lib/dns/tests/master_lexer_unittest.cc
* | [2375] Return a reference to the tokenMichal 'vorner' Vaner2012-11-221-1/+1
| | | | | | | | The copy is shallow anyway, so it wouldn't survive for long.
* | [2375] Handle EOF after unbalanced parenthesesMichal 'vorner' Vaner2012-11-221-1/+3
| | | | | | | | | | | | If there's an error that manifests at the end of a file, like an unbalanced parenthesis or a quoted string that does not end, report the error. But also, return EOF as the next token, not an exception.
* | [2375] Remove exception handling from getNextTokenMichal 'vorner' Vaner2012-11-221-21/+11
| | | | | | | | | | It was deemed unneeded and is removed therefore, to make the code smaller.
* | [2375] Don't restore internal token on ungetTokenMichal 'vorner' Vaner2012-11-191-6/+0
| | | | | | | | | | | | | | It was not safe, because it may refer to some data elsewhere. Luckily, it seems it is not needed anyway, since the only way that a token can get out of the lexer is through the getNextToken, which would get a new one, and through a testing method not meant for public use.
* | [2375] Provide weak exception guaranteeMichal 'vorner' Vaner2012-11-191-10/+23
| |
* | [2375] Implement ungetting tokensMichal 'vorner' Vaner2012-11-191-5/+33
| |
* | [2375] Tests for ungetting tokensMichal 'vorner' Vaner2012-11-191-9/+20
| |
* | [2375] Check we don't read past the endMichal 'vorner' Vaner2012-11-191-2/+3
| |
* | [2375] Add a test a token is actually producedMichal 'vorner' Vaner2012-11-191-2/+9
| | | | | | | | | | | | This is a debug test. It checks the state machine produced a token. There are no tests for this test, since such condition would be a programmer error, not something expected.
* | [2375] Implement basic getNextTokenMichal 'vorner' Vaner2012-11-191-4/+10
| | | | | | | | No error handling, no special cases, no returning.
* | [2375] Tests for simple versions of getTokenMichal 'vorner' Vaner2012-11-191-0/+6
| | | | | | | | | | No fancy stuff yet, like ungetting tokens, changes of parentheses count, etc. Just the basic stuff.
* | [2375] A fake state classMichal 'vorner' Vaner2012-11-191-0/+46
| | | | | | | | It is for tests, but in the main code for technical reasons.
* | [2375] getNextToken() and ungetNextToken() interface.Michal 'vorner' Vaner2012-11-191-0/+11
|/ | | | | With doxygen description of what it should do and empty method bodies, so the tests in following commits will at least compile.
* [2373] added a comment about if-else complexity in State::start().JINMEI Tatuya2012-11-191-0/+3
|
* [2373] some more comment updatesJINMEI Tatuya2012-11-151-1/+5
|
* [2373] refactoring: extend skipComment to include 'escaped' consideration.JINMEI Tatuya2012-11-151-6/+4
| | | | this will help constify 'c' in String::handle.