On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <bigcheesegs at gmail.com>wrote:> On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran <shankare at codeaurora.org > > wrote: > >> Hi, >> >> We have a whole bunch of readers(we would have some more too), and was >> thinking if we should have a vector of Readers, and have a function >> isMyFormat in each of them. >> >> Any reader that knows to handle, goes ahead and parses the file. >> >> On a side note, we currently use .objtxt as an figure out if the file is >> a YAML file or not. I have added FIXME's in the code, if we could some kind >> of magic (or) a better way to figure out if the file is YAML ? >> >> Thanks >> >> Shankar Easwaran >> >> -- >> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted >> by the Linux Foundation >> >> > So apparently I didn't reply all when I suggested this. > > For determining which YAML reader to use, we should use YAML tags. This > allows multiple different types of input files in a single YAML stream. > > !archive > <blah> > --- > !ELF > <blah> > --- > !atoms > <blah> > > For differentiating between linker scripts and YAML, I agree that some > form of comment magic is best. >Since our YAML stuff is all internal anyway, wouldn't it be simpler to just hardcode the limited set of extensions we use for YAML files, and only do that with non-emulated drivers unless explicitly asked to do so? -- Sean Silva> > - Michael Spencer > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131014/53c2ae21/attachment.html>
On 10/14/2013 8:20 PM, Sean Silva wrote:> On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <bigcheesegs at gmail.com>wrote: > >> On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran <shankare at codeaurora.org >>> wrote: >>> Hi, >>> >>> We have a whole bunch of readers(we would have some more too), and was >>> thinking if we should have a vector of Readers, and have a function >>> isMyFormat in each of them. >>> >>> Any reader that knows to handle, goes ahead and parses the file. >>> >>> On a side note, we currently use .objtxt as an figure out if the file is >>> a YAML file or not. I have added FIXME's in the code, if we could some kind >>> of magic (or) a better way to figure out if the file is YAML ? >>> >>> Thanks >>> >>> Shankar Easwaran >>> >>> -- >>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted >>> by the Linux Foundation >>> >>> >> So apparently I didn't reply all when I suggested this. >> >> For determining which YAML reader to use, we should use YAML tags. This >> allows multiple different types of input files in a single YAML stream.Agree.>> !archive >> <blah> >> --- >> !ELF >> <blah> >> --- >> !atoms >> <blah>I think <blah> has to be a key value pair here, which could be represented as target:<triple>>> >> For differentiating between linker scripts and YAML, I agree that some >> form of comment magic is best.#!lld ? As lld would be interpreting this file ?> Since our YAML stuff is all internal anyway, wouldn't it be simpler to just > hardcode the limited set of extensions we use for YAML files, and only do > that with non-emulated drivers unless explicitly asked to do so?That model would be difficult to maintain and we already have the YAML file as a avaialable form of an external output file (output-filetype=yaml). On a sidenote, All of the readers would have a validation function that would check the architecture, which makes extensions highly unmanageable. Thanks Shankar Easwaran
On Mon, Oct 14, 2013 at 11:33 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:> On 10/14/2013 8:20 PM, Sean Silva wrote: > >> On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <bigcheesegs at gmail.com >> >wrote: >> >> On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran < >>> shankare at codeaurora.org >>> >>>> wrote: >>>> Hi, >>>> >>>> We have a whole bunch of readers(we would have some more too), and was >>>> thinking if we should have a vector of Readers, and have a function >>>> isMyFormat in each of them. >>>> >>>> Any reader that knows to handle, goes ahead and parses the file. >>>> >>>> On a side note, we currently use .objtxt as an figure out if the file is >>>> a YAML file or not. I have added FIXME's in the code, if we could some >>>> kind >>>> of magic (or) a better way to figure out if the file is YAML ? >>>> >>>> Thanks >>>> >>>> Shankar Easwaran >>>> >>>> -- >>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, >>>> hosted >>>> by the Linux Foundation >>>> >>>> >>>> So apparently I didn't reply all when I suggested this. >>> >>> For determining which YAML reader to use, we should use YAML tags. This >>> allows multiple different types of input files in a single YAML stream. >>> >> Agree. > > !archive >>> <blah> >>> --- >>> !ELF >>> <blah> >>> --- >>> !atoms >>> <blah> >>> >> I think <blah> has to be a key value pair here, which could be > represented as target:<triple> > > >>> For differentiating between linker scripts and YAML, I agree that some >>> form of comment magic is best. >>> >> #!lld ? As lld would be interpreting this file ? > > > Since our YAML stuff is all internal anyway, wouldn't it be simpler to >> just >> hardcode the limited set of extensions we use for YAML files, and only do >> that with non-emulated drivers unless explicitly asked to do so? >> > That model would be difficult to maintain and we already have the YAML > file as a avaialable form of an external output file (output-filetype=yaml). >Do we actually have users that rely on that feature? Is the YAML format is stable enough for being exposed to users? It seems unwise to expose what is effectively a debug/testing format to users. -- Sean Silva> > On a sidenote, All of the readers would have a validation function that > would check the architecture, which makes extensions highly unmanageable. > > Thanks > > Shankar Easwaran >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131015/3390d541/attachment.html>
On Mon, Oct 14, 2013 at 8:33 PM, Shankar Easwaran <shankare at codeaurora.org>wrote:> On 10/14/2013 8:20 PM, Sean Silva wrote: > >> On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <bigcheesegs at gmail.com >> >wrote: >> >> On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran < >>> shankare at codeaurora.org >>> >>>> wrote: >>>> Hi, >>>> >>>> We have a whole bunch of readers(we would have some more too), and was >>>> thinking if we should have a vector of Readers, and have a function >>>> isMyFormat in each of them. >>>> >>>> Any reader that knows to handle, goes ahead and parses the file. >>>> >>>> On a side note, we currently use .objtxt as an figure out if the file is >>>> a YAML file or not. I have added FIXME's in the code, if we could some >>>> kind >>>> of magic (or) a better way to figure out if the file is YAML ? >>>> >>>> Thanks >>>> >>>> Shankar Easwaran >>>> >>>> -- >>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, >>>> hosted >>>> by the Linux Foundation >>>> >>>> >>>> So apparently I didn't reply all when I suggested this. >>> >>> For determining which YAML reader to use, we should use YAML tags. This >>> allows multiple different types of input files in a single YAML stream. >>> >> Agree. > > !archive >>> <blah> >>> --- >>> !ELF >>> <blah> >>> --- >>> !atoms >>> <blah> >>> >> I think <blah> has to be a key value pair here, which could be > represented as target:<triple>This is really a change to the YAML and Native formats. It's not required for solving this problem.> > >>> For differentiating between linker scripts and YAML, I agree that some >>> form of comment magic is best. >>> >> #!lld ? As lld would be interpreting this file ?Heh, you could have the shell run the yaml file :P - Michael Spencer> > > Since our YAML stuff is all internal anyway, wouldn't it be simpler to >> just >> hardcode the limited set of extensions we use for YAML files, and only do >> that with non-emulated drivers unless explicitly asked to do so? >> > That model would be difficult to maintain and we already have the YAML > file as a avaialable form of an external output file (output-filetype=yaml). > > On a sidenote, All of the readers would have a validation function that > would check the architecture, which makes extensions highly unmanageable. > > Thanks > > Shankar Easwaran >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131015/b8dfd84b/attachment.html>