Skip to content
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

The logic of Parser seems not be right to me? #12

Open
gaoyunhaii opened this issue Mar 30, 2019 · 2 comments
Open

The logic of Parser seems not be right to me? #12

gaoyunhaii opened this issue Mar 30, 2019 · 2 comments

Comments

@gaoyunhaii
Copy link

The main logic of the the parser is

for each line {
       source = ...

        while cur_source < source {
            node_writer.write(&unsafe { mem::transmute::<_, [u8; 8]>(cur_offset) }).unwrap();
            cur_source += 1;
        }
}

For a sample file:

0 1
0 2
1 2
2 3

The resulted offset will be [2, 3, 4, 4], but it seems should be [0, 2, 3, 4] ?

@frankmcsherry
Copy link
Owner

On the road at the moment, but will investigate. The project is a bit old, so perhaps there is a lingering bug that should be fixed. The graph-map project is where the parse.rs and print.rs code I trust lives.

@gaoyunhaii
Copy link
Author

OK, Got it. I will try graph-map first then. Thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants