Coder Social home page Coder Social logo

New parser for Pillar about pillar HOT 17 CLOSED

pillar-markup avatar pillar-markup commented on May 23, 2024
New parser for Pillar

from pillar.

Comments (17)

jecisc avatar jecisc commented on May 23, 2024

I created a PetitPillar parser that works but it still depend on the old parser.
We need to improve that.

from pillar.

DamienCassou avatar DamienCassou commented on May 23, 2024

I think job is done at 90% (nearly all tests pass). The remaining 10% are details here and there where the new parser still depends on some pieces of the old one. Maybe the simplest thing to do is to move the parts that are useful from the old parser to the new one and remove the old. Then, in a second step, we can rewrite these parts in petit parser.

from pillar.

jecisc avatar jecisc commented on May 23, 2024

I removed the dependency of the annotation parser.

Dependencies left:

  • figures
  • links
  • raw

from pillar.

jecisc avatar jecisc commented on May 23, 2024

Dependencies left:

  • Raw

from pillar.

jecisc avatar jecisc commented on May 23, 2024

An independent version of PetitPillar is ready :)
This version need test on real chapter to see if we do not lack of tests and if the time of parse is correct with the recent changes.

from pillar.

jecisc avatar jecisc commented on May 23, 2024

The old parser was able to parse ==\""bold""== but PetitPillar no. should we charge PetitPillar or do we expect the user to write ==\""bold\""== ? @DamienCassou

from pillar.

jecisc avatar jecisc commented on May 23, 2024

For now PetitPillar have a problem if we have something as ==*== blabla ==*== I think. It creates 1 format with 1 internal link with == blabla == as reference.
The parse of the other contents of the format do not stop at the end of the format.

from pillar.

jecisc avatar jecisc commented on May 23, 2024

Maybe the simpler would be to only have:

    boldFormat
        ^ boldMarkup, (escape / boldmarkup negate) star , boldMarkup

then re-parse the content to check formats, links, raw…

It's maybe not optimal but it will be hard to do better quickly.

from pillar.

DamienCassou avatar DamienCassou commented on May 23, 2024

CyrilFerlicot [email protected] writes:

The old parser was able to parse ==\""bold""== but PetitPillar no.
should we charge PetitPillar or do we expect the user to write
\==bold\== ? @DamienCassou

when writing ==\""bold""==, we expect Pillar to construct this
structure:

PRMonospace
  PRText: ""bold""

I think we want to keep have a way to write something that will generate
this structure: it could as well be =="\"bold""==. If you make this
second example work, no need to make the first work as well. We will fix
the books.

On the contrary, \==bold\== should have this structure

PRText: ==bold==

Each time we find something not parsing in the book, we should add a
unit test to detect the problem sooner.

Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

from pillar.

DamienCassou avatar DamienCassou commented on May 23, 2024

CyrilFerlicot [email protected] writes:

For now PetitPillar have a problem if we have something as ==*== blabla ==*== I think. It creates 1 format with 1 internal link with == blabla == as reference.
The parse of the other contents of the format do not stop at the end of the format.

If the writer wants a * in mono space, he should protect it: ==\*== blabla ==\*==. If the write wants to have an equal-equal inside a mono
space, he should protect it: ==\*=\= blabla =\=\*==. If the user wants
an internal link in mono space, he should protect the equal-equal:
==*=\= blabla =\=*==.

Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

from pillar.

jecisc avatar jecisc commented on May 23, 2024

I updated the book and now the build pass :)

I think we can do a new configuration I think !

from pillar.

jecisc avatar jecisc commented on May 23, 2024

Or maybe not… It seams we have some warnings we did not had before… I'll take a look later.

from pillar.

jecisc avatar jecisc commented on May 23, 2024

Corrected !

from pillar.

DamienCassou avatar DamienCassou commented on May 23, 2024

I validated the new parser on ReadyForReviews chapters. Everything is fine there as well

from pillar.

DamienCassou avatar DamienCassou commented on May 23, 2024

and on InProgress chapters. Everything is fine there as well. I think we should release Pillar v2.0.0.

from pillar.

jecisc avatar jecisc commented on May 23, 2024

:)

from pillar.

jecisc avatar jecisc commented on May 23, 2024

Name: ConfigurationOfPillar-CyrilFerlicot.167
Author: CyrilFerlicot
Time: 11 September 2015, 12:05:10.764145 pm
UUID: 2af05692-ab27-3749-afc8-af3f061f6ccc
Ancestors: ConfigurationOfPillar-CyrilFerlicot.166

from pillar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.