示例#1
0
    def test_parse_select(self):
        SASDoc.from_string('''
SELECT;
WHEN(&SEX='2') _AGESEX  = 1;
OTHERWISE;
END;
        ''')
示例#2
0
 def test_parse_title(self):
     SASDoc.from_file('corpus/test-parse-title.sas')
示例#3
0
 def test_symio_001(self):
     SASDoc.from_file('corpus/test-symio-001.sas')
示例#4
0
 def test_parse_proc_format(self):
     SASDoc.from_file('corpus/test-parse-proc-format.sas')
示例#5
0
 def test_parse_proc_datasets(self):
     SASDoc.from_file('corpus/test-parse-proc-datasets.sas')
示例#6
0
 def test_parse_ods(self):
     print(SASDoc.from_file('corpus/test-parse-ods.sas'))
示例#7
0
 def test_parse_libname(self):
     SASDoc.from_file('corpus/test-parse-libname.sas')
示例#8
0
 def test_parse_do(self):
     SASDoc.from_file('corpus/test-parse-do.sas')
示例#9
0
 def test_nocrash_snf_profiles(self):
     SASDoc.from_file('corpus/snf-profiles.sas')
示例#10
0
 def test_nocrash_bene_characteristics(self):
     SASDoc.from_file('corpus/AC001_P03_Q01_20160628_S01.sas')
示例#11
0
 def test_parse_sql_sas_nonstandard(self):
     SASDoc.from_file('corpus/test-parse-sql-nonstandard.sas')
示例#12
0
 def test_parse_sql_create_view(self):
     SASDoc.from_file('corpus/test-parse-sql-create-view.sas')
示例#13
0
 def test_parse_sql_create_table(self):
     SASDoc.from_file('corpus/test-parse-sql-create-table.sas')
示例#14
0
 def test_parse_var(self):
     SASDoc.from_file('corpus/test-parse-var.sas')
示例#15
0
 def test_parse_toplevel(self):
     SASDoc.from_file('corpus/test-parse-toplevel.sas')
示例#16
0
 def test_parse_control(self):
     SASDoc.from_file('corpus/test-parse-control.sas')
示例#17
0
 def test_parse_data(self):
     SASDoc.from_file('corpus/test-parse-data.sas')
示例#18
0
 def test_nocrash_hospital_profiles(self):
     SASDoc.from_file('corpus/hospital-profiles.sas')
示例#19
0
 def test_parse_drop(self):
     SASDoc.from_file('corpus/test-parse-drop.sas')
示例#20
0
 def test_nocrash_awvcclfv6(self):
     SASDoc.from_file('corpus/awvcclfv6.sas')
示例#21
0
 def test_parse_macros(self):
     SASDoc.from_file('corpus/test-parse-macros.sas')
示例#22
0
 def test_empty_doc(self):
     SASDoc.from_string('')
示例#23
0
 def test_parse_options(self):
     SASDoc.from_file('corpus/test-parse-options.sas')
示例#24
0
 def test_empty_stmt(self):
     SASDoc.from_string(';')
示例#25
0
 def test_parse_proc_export(self):
     SASDoc.from_file('corpus/test-parse-proc-export.sas')
示例#26
0
 def test_ParseNode_comment_dump(self):
     SASDoc.from_string('*;').dump()
示例#27
0
文件: parse.py 项目: rflynn/sasparse
from sasparse import SASDoc

if __name__ == '__main__':

    import sys

    inputfile = sys.stdin
    if sys.argv[1:]:
        inputfile = open(sys.argv[1])

    sys.setrecursionlimit(3000)

    doc = SASDoc.from_fd(inputfile)
    from pprint import pprint
    pprint(doc.top, width=1)
    # print(doc.format(None))
示例#28
0
 def test_macro_macro_call_variable(self):
     SASDoc.from_string(
         '%IF "&LABELMAC" ne "" %THEN %&LABELMAC;  *HCC labels;').dump()
示例#29
0
def parsefile(sasfilepath):
    SASDoc.from_file(sasfilepath)
示例#30
0
 def test_parse_array(self):
     SASDoc.from_file('corpus/test-parse-array.sas')