diff options
author | Diego Nieto Cid <dnietoc@gmail.com> | 2010-07-20 16:48:28 -0300 |
---|---|---|
committer | Diego Nieto Cid <dnietoc@gmail.com> | 2011-04-08 14:36:18 -0300 |
commit | dd639e8a51c4d986c51c2bb6f8f91b0e2a9306c9 (patch) | |
tree | f0d0a30b4ff79c468778e6b613035958164e704e /console-client/xkb | |
parent | 650a8244fcb3a2f7897842d70073a491832b918e (diff) |
Add function to read the state of the scanner.
* console-client/xkb/lex.l (scanner_get_current_location): New function.
(scanner_get_current_file): Likewise.
Diffstat (limited to 'console-client/xkb')
-rw-r--r-- | console-client/xkb/lex.l | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/console-client/xkb/lex.l b/console-client/xkb/lex.l index 379ce692..8887e7a5 100644 --- a/console-client/xkb/lex.l +++ b/console-client/xkb/lex.l @@ -368,3 +368,15 @@ overlay2 { yylval.val = 2; return OVERLAY; } fprintf (stderr, "%s:%d: %s\n", filename, lineno, s); // error_at_line (0, 1, filename, lineno, "foo %d\n", 2); } + + int + scanner_get_current_location() + { + return lineno; + } + + const char* + scanner_get_current_file() + { + return filename; + } |