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

zy/47 fix multiline issue #48

Merged
merged 5 commits into from
Aug 6, 2024
Merged

zy/47 fix multiline issue #48

merged 5 commits into from
Aug 6, 2024

Conversation

zheyxu
Copy link
Collaborator

@zheyxu zheyxu commented Jul 29, 2024

Handle with test file:

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix show: <http://example.org/vocab/show/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

show:218 rdfs:label "That Seventies Show"^^xsd:string .            
show:218 rdfs:label "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . 
show:218 rdfs:label "That Seventies Show" .                                           
show:218 show:localName "That Seventies Show"@en .                 
show:218 show:localName 'Cette Série des Années Soixante-dix'@fr . 
show:218 show:localName "Cette Série des Années Septante"@fr-be .  
show:218 show:blurb '''This is a multi-line
literal with many quotes (""""")
and up to two sequential apostrophes ('').'''^^xsd:string .

And in parse result, (""""") is convert to ([\, "][\, "][\, "][\, "][\, "]) to avoid parse exception (petitparser seems to only accent one pair of " in one literal).

@zheyxu zheyxu linked an issue Jul 29, 2024 that may be closed by this pull request
@zheyxu zheyxu requested review from gjwgit and anushkavidanage July 29, 2024 16:04
@zheyxu zheyxu mentioned this pull request Jul 29, 2024
@zheyxu zheyxu requested review from cdawei and removed request for gjwgit July 30, 2024 00:44
@zheyxu zheyxu self-assigned this Jul 30, 2024
Copy link
Collaborator

@anushkavidanage anushkavidanage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to work in my testing? example_7.dart file does not parse the turtle content as expected. Am I doing something wrong here?

@zheyxu
Copy link
Collaborator Author

zheyxu commented Jul 30, 2024

This does not seem to work in my testing? example_7.dart file does not parse the turtle content as expected. Am I doing something wrong here?

Can you parse the result?

@cdawei cdawei requested review from srodriguez142857 and removed request for cdawei August 1, 2024 01:34
@anushkavidanage
Copy link
Collaborator

All works well on Windows. It would be good if we can test this on Linux as well

@zheyxu
Copy link
Collaborator Author

zheyxu commented Aug 2, 2024

All works well on Windows. It would be good if we can test this on Linux as well

Thanks @anushkavidanage, it has been tested on Linux and works well.

@srodriguez142857
Copy link
Collaborator

@zheyxu
I have the following two observations:

image

image

@zheyxu
Copy link
Collaborator Author

zheyxu commented Aug 6, 2024

Hi @srodriguez142857, made updates accordingly

Screenshot 2024-08-06 at 10 52 03 AM

@srodriguez142857
Copy link
Collaborator

Hi @zheyxu.

The output looks compliant with the Turtle spec: Quoted Literals section.

It would be ideal to have a thorough check of the syntax production rule for the [17] String.
However, as for now, the update is complete and serves our purposes.

All good.

@zheyxu zheyxu merged commit 9648d7a into main Aug 6, 2024
1 check passed
@zheyxu zheyxu deleted the zy/47_parse_multi_line_literals branch August 6, 2024 04:07
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

Successfully merging this pull request may close these issues.

Parse multi-line literals
3 participants