Parsing tnsnames.ora in Visual C# 2008

后端 未结 3 1836
慢半拍i
慢半拍i 2020-12-11 20:26

How I parse tnsnames.ora file using Visual C# (Visual Studio 2008 Express edition) to get the tnsnames ? For instance, my tnsnames.ora file contains

ORCL =
         


        
3条回答
  •  无人及你
    2020-12-11 20:53

    First of all, you will need the syntax rules for this file.

    There is probably a hack for this, but I would personally go with a full parser, like ANTLR combined with the proper grammar (a complete list of ANTLR grammars can be found here).

提交回复
热议问题