llylly
A useful parser for Lapis scripts. Provides Python API as interface.
- 
libxml (headers should be contained in the proj & installed in OS) lib/libxml
- 
libyaml (headers should be contained in the proj & installed in OS) lib/libyaml
- 
libcurl headers (headers should be contained in the proj & installed in OS) lib/libcurl
- 
openssl (should be installed in OS) 
- 
Download the repository 
- 
Download libyaml (0.1.7) & compile 
- 
Copy yaml.h(the header file) tolib/libyamlfolder
- 
Download libxml2 (2.9.6) & compile 
- 
Copy the header file folder (the include/libxmlfolder) tolib/libxmlfolder".h" header files lies in lib/libxml/libxmlfolder then.
- 
Download libcurl (7.56.1) & compile 
- 
Copy the header file foler (the include/curlfolder) tolib/libcurlfolder".h" header files lies in lib/libcurl/curlfolder then.
- 
Run cmake .in project root directory
- 
Run makein project root directory, then you will getlibVParserPy.dylib& executableVParserin root directory
- 
Run cd interface/python/
- 
Run python demo.py& executable file for test
Header files: interface/Interface.h
Include the header file, then call init() before calling any other interfaces.
Then enjoy it :)
- 
Usage: import LapisParser result = LapisParser.{FuncName}(params...) 
- 
Demo: interface/python/demo.pyWhere to get to know the usage. 
- 
API: Browse html/index.htmlfor interface document. It's in the document forinterface/Interface.h.Every C++ interface here has a strictly corresponding Python one except for init(), which is executed during package initialization.- string (C++) - String (Python)
- BaseDataObject*(C++) - String / Bool / int / float / dict / list (all accepted) (Python)
- Default parameters are also valid for Python inferfaces
 
	Please view html/_interface_8h.html.
Basic functions, including parse, request and scenario test, all finished.
Some small features and extensions to be done (mainly about expression parse):
- schema/APIObject.cpp
consumes & produces check
- 
schema/data_schema/StringSchema.cpp String Type: 'format:date' validation 'format:dataTime' validation 'regex' validation (currently always true) 'regex' generating by pattern (currently return empty string) 'regex' check by pattern (currently return true) 
- 
scenario/module/ModuleInputConstraintObject.cpp Expression support of Input Constraints:  'expression' field is stored but always ignored  Only use the value itself 
- 
scenario/module/ModuleSetEffectObject.cpp Delete expression support:  current only store but always ignored  currently delete all elements