-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing User Error for InvalidToken #21
Merged
Merged
Changes from 65 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
e61ae74
Lock the Cargo manifest\!
adjivas 5c5f5c2
Merge pull request #2 from ulysseB/master
adjivas 1d96bfe
pre-implementation of flex
adjivas 9bd95b7
reconfigure travis as nightly
adjivas 3bff133
naive first implementation of C part exh-lang's lexer
adjivas b0c4594
C union representation
adjivas 7c5c3fc
Enumeration CmpOp
adjivas 0f24f57
add yystr rules and incomplet test
adjivas ea3cbdd
fixe a bit of F/lex syntax with first short test
adjivas 2ebdcd0
add second test for code's token
adjivas b208619
reset test as a complet list of token, add of a null character to the…
adjivas 473f57c
fixe test
adjivas 86ad6fe
not need null character, solve it with yy_scan_bytes function
adjivas 499cff2
implementation of c comment
adjivas 9bfb3c6
naive implementation of DOC token
adjivas 12d8251
Blank Token as mute (not needed by Gen)
adjivas a168023
mute c warning of generated by f/lex's unused variables
adjivas c428e28
remove unnecessary ffi prefix
adjivas bf84ae3
allow dead code for ffi
adjivas 05ab085
allow unused {function,variable,parameter} for {F/lex,C}
adjivas 8b5294b
fixe dependency gcc as cc, see issue #3
adjivas 8d2387c
rewrite DOC token with a start condition
adjivas e054856
fixe // comment
adjivas 2493f7f
retarget test for cc_test
adjivas d29bc3b
comment rule
adjivas c9e49e6
ast doc recursive concat
adjivas 341c17b
enable all compilation
adjivas a22991c
prepare travis PR
adjivas 7500bf9
add feature lex, need this feature to generate the lexer, or else a d…
adjivas 86dd15e
by default, travis will regenerate the lexer too
adjivas 989621f
Merge branch 'master' into lex
d806c24
Update comment liking to lex doc.
0fe1301
sync
adjivas 9710ce2
Merge pull request #4 from ulysseB/master
adjivas 4e7a84c
replace drain_filter by all,filter for stabilize rust as stable channel
adjivas f217491
Merge branch 'lex' of https://github.com/adjivas/telamon into lex
adjivas 478505a
retain fixe is_subset_of_def as reverse, remark, this line is uncover…
adjivas bad658d
fixe coding style, closure as for, not as !
adjivas a3c5784
dereferencing var
adjivas 1e72a13
add benchmark for lexer
adjivas 827c65f
criterion manifest
adjivas aa340e9
manifest travis now checks rust as stable
adjivas 672aad3
fixe auto example according to issue #5330
adjivas 2bb3337
add poc.l to dependency condition of Cargo rebuilt
adjivas 24d5c74
enable f/lex feature yylineno, implemente YY_EXTRA and YY_USER, lalrp…
adjivas ab75b8e
naive reforcement lexer test with Position check, next check will add…
adjivas 21e02d6
move enumerations from l to include/h
adjivas 8d06681
documentation renforcement
adjivas 3fe2051
compile lexer with source include for C header
adjivas 50ce1cc
rewrite define extra-type by option extra-type and implemente line/co…
adjivas 38555b3
recompile lexer
adjivas ec6da00
add case for line/colum of line/doc and c_comment
adjivas 2aef8fd
the destructor of lexer clears the disingenuous yylineno
adjivas 99989ff
InvalidToken is now returned as error from the lexer part
adjivas 69a5d0d
move Invalid from Token to LexicalError
adjivas 95c38a5
add macro pub_generated_file to create a public module for extern usa…
adjivas c79588b
parse is now a public module, process/file can now returns a parser e…
adjivas 2889ac0
invalidToken checks for lexer\&parser
adjivas 997e3d9
unwrap returns of process/file
adjivas 39a59f0
solve merge
adjivas dcf84cf
Merge pull request #5 from ulysseB/master
adjivas 74f640a
unwrap for generate/file
adjivas 74f6990
move common module into example
adjivas b76878c
Merge branch 'parsing' of https://github.com/adjivas/telamon into par…
adjivas f251f3d
line number is now set from the lexer constructer
adjivas a56f0b3
remove unecessary manifest autoexample field
adjivas 127f961
move exh.c into src
adjivas 8015e0f
rename Span as Spanned
adjivas c7bed5d
LALRPOP documentation
adjivas d67714b
generated_file as (pub) macro; danielkeep.github.io/tlborm/book/pat-v…
038a016
keyword pub
125fe23
Merge pull request #6 from adjivas/master
adjivas 9f2438b
add the Error trait for LexicalError
adjivas aaf0a4d
process function too returns filename
adjivas 22ddba3
token derive from clone and lexer has now a struct Span
adjivas 5cb8977
naive test for ProcessError
adjivas 2dd6ea5
change output error and add cause enumeration for ProcessError
adjivas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#[macro_use] | ||
extern crate criterion; | ||
extern crate telamon_gen; | ||
|
||
use criterion::Criterion; | ||
|
||
use telamon_gen::lexer; | ||
|
||
use std::fs; | ||
use std::ffi::OsStr; | ||
|
||
fn criterion_benchmark(c: &mut Criterion) { | ||
let entries = fs::read_dir("cc_tests/src/").unwrap(); | ||
for entry in entries { | ||
if let Ok(entry) = entry { | ||
if entry.path().extension().eq(&Some(OsStr::new("exh"))) { | ||
let path = entry.path(); | ||
let mut input = fs::File::open(&path).unwrap(); | ||
let mut name = String::from("lexer "); | ||
name.push_str(path.file_stem().unwrap().to_str().unwrap()); | ||
|
||
c.bench_function(&name, move |b| b.iter(|| lexer::Lexer::new(&mut input))); | ||
} | ||
} | ||
} | ||
} | ||
|
||
criterion_group!(benches, criterion_benchmark); | ||
criterion_main!(benches); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is that for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That a confusion about the issue 5330, travis repport a warning for a unused manifest key package.autoexamples but that not same on my configuration.
I recommend to remove this line, that probably not more needed and I have solved the example at 74f6990bdeb67bcef425ed0314a875776049f32f