PageSourceSearch

https://cenotelie.fr/_next/static/chunks/pages/projects/hime/referenceHimecc-e06c860878c001a1.js

js cenotelie.fr collected 2026-10-05 06:16:22 UTC 10,003 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1923],{8495:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/projects/hime/referenceHimecc",function(){return l(34533)}])},56821:function(e,s,l){"use strict";l.d(s,{Z:function(){return m}});var a=l(85893);l(67294);var i=l(25675),r=l.n(i),t=l(41664),c=l.n(t);l(85486);var n=l(29536),o=l(26847),d=l(47733),h=l(43412),p=l(27858);function m(e){var s=e.children,l=e.title;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{title:"Hime - ".concat(l),metaDataContent:"Hime, opensource"}),(0,a.jsx)(n.Z,{}),(0,a.jsxs)("section",{className:"relative block h-500-px",children:[(0,a.jsxs)("div",{className:"absolute top-0 w-full h-full bg-center bg-cover",children:[(0,a.jsx)(r(),{alt:"Open-source image",src:d.Z,placeholder:"blur",quality:100,fill:!0,sizes:"100vw",style:{objectFit:"cover"},priority:!0}),(0,a.jsx)("span",{id:"blackOverlay",className:"w-full h-full absolute opacity-75 bg-black"})]}),(0,a.jsx)("div",{className:"top-auto bottom-0 left-0 right-0 w-full absolute pointer-events-none overflow-hidden h-16",style:{transform:"translateZ(0)"},children:(0,a.jsx)("svg",{className:"absolute bottom-0 overflow-hidden",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 2560 100",x:"0",y:"0",children:(0,a.jsx)("polygon",{className:"text-blueGray-200 fill-current",points:"2560 0 2560 100 0 100"})})})]}),(0,a.jsx)("section",{className:"relative py-16 bg-blueGray-200",children:(0,a.jsxs)("div",{className:"container mx-auto",children:[(0,a.jsx)("div",{className:"relative flex flex-col min-w-0 break-words bg-white w-full mb-6 shadow-xl rounded-lg -mt-64"}),(0,a.jsx)("div",{children:(0,a.jsxs)(c(),{href:"/solutions/portfolio",className:"align-left mt-4 text-sm py-2 px-4 uppercase font-semibold block w-full whitespace-nowrap bg-transparent text-blueGray-700 hover:text-blueGray-500 text-blueGray-700 hover:text-blueGray-500 hover:transition-all-duration-300-ease-in-out",children:[(0,a.jsx)("i",{className:"fa-solid fa-caret-left"})," open-source"]})}),(0,a.jsxs)("div",{className:"mt-12 ml-8",children:[(0,a.jsx)("div",{className:"text-blueGray-500 p-3 inline-flex items-center w-120 h-120 mb-6 shadow-lg rounded-full bg-white",children:(0,a.jsx)(r(),{alt:"Hime logo",src:h.Z,width:"100",height:"100"})}),(0,a.jsx)(p.Z,{children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsx)("h3",{className:"text-3xl mb-2 font-semibold leading-normal",children:l})}),s]})})]})]})})]})}},34533:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return c}});var a=l(85893);l(67294);var i=l(41664),r=l.n(i),t=l(56821);function c(){return(0,a.jsxs)(t.Z,{title:"himecc command line",children:[(0,a.jsxs)("p",{children:["This page contains the reference documentation for the command line usage of the Hime parser generator. The command line utility, named"," ",(0,a.jsx)("code",{children:"himecc"})," can be downloaded in the distribution, see the"," ",(0,a.jsx)(r(),{className:"text-lg hover:text-blueGray-500",href:"/projects/hime/download",children:"download page"}),"."]}),(0,a.jsx)("h3",{className:"text-xl mb-2 font-semibold leading-normal",children:"Arguments"}),(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:["General help: Display a help screen with the description of the options.",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsx)("li",{className:"pl-3 pb-2",children:(0,a.jsx)("code",{children:"-h"})}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:(0,a.jsx)("code",{children:"--help"})})]})]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:["Input selection:",(0,a.jsx)("ul",{className:"list-disc pl-4 py-2",children:(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-g, --grammar <GRAMMAR>"}),", Select the top grammar to compile if more than one are given. It is possible to define multiple grammar in the same file, or to give multiple files to the tool. This option is to be followed by the name of the grammar that will act as the top one to be compiled."]})})]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:["Output options:",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-o, --output <MODE>"})," The output mode, possible values are: sources, assembly, all.",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"sources"})," (default value), Emit the sources for the parser."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"assembly"}
1),", Compile the generated parser code in an assembly. The exact form depends on the target platform."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"all"}),", Emit both the sources and the compiled assembly."]})]})]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-t, --target <TARGET>"})," The target runtime, possible values are: net, java, rust.",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"net"})," (default value), Generate code for the .Net framework in C#."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"java"}),", Generate Java code."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"rust"}),", Generate Rust code."]})]})]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-p, --path <PATH>"}),", The path to write the output. By default, the current directory is used."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-a, --access <ACCESS>"})," The access modifier for the generated code, possible values are: internal, public.",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"internal"})," (default value), In the generated code, symbols are kept internal/private."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"public"}),", In the generated code, symbols are made public."]})]})]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-n, --namespace <NMSPCE>"}),", The namespace to use for the generated code. If none is given, and the target runtime requires one, the name of the grammar will be used."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"-m, --method <METHOD>"})," The parsing method to use, possible values are: lr0, lr1, lalr1, rnglr1, rnglalr1.",(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"lr0"}),", LR(0) parsing method. Use for test purposes."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"lr1"}),", LR(1) parsing method. Use for test purposes."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"lalr1"})," (default value), LALR(1) parsing method. This is a sensible default for simple to moderately complex grammars."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"rnglr1"}),", RNGLR(1) parsing method. Use for test purposes."]}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:[(0,a.jsx)("code",{children:"rnglalr1"}),", RNGLALR(1) parsing method. Choose this option if you want a GLR parser."]})]})]})]})]})]}),(0,a.jsx)("h3",{className:"text-xl mb-2 font-semibold leading-normal",children:"Examples"}),(0,a.jsx)("p",{children:"With no option set, the tool compiles the first grammar it finds in the given input,"}),(0,a.jsxs)("ul",{className:"list-disc pl-4 py-2",children:[(0,a.jsx)("li",{className:"pl-3 pb-2",children:"it will only generate the source code (and binary resources) of the lexer and parser"}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:"it will output the files in the current directory with the name of the grammar as a prefix"}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:"it will generate a LALR parser"}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:"the namespace for the generated code will be the name of the grammar"}),(0,a.jsxs)("li",{className:"pl-3 pb-2",children:["the access modifier for the generated code will be"," ",(0,a.jsx)("code",{children:"internal"})]}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:"the compilation log will not be saved (but displayed on the console)"}),(0,a.jsx)("li",{className:"pl-3 pb-2",children:"the grammar's documentation will not be generated"})]}),(0,a.jsx)("p",{children:"To output only an assembly:"}),(0,a.jsx)("code",{children:"MyGram.gram -o assembly"}),(0,a.jsx)("p",{children:"To output both the sources and the compiled assembly:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -o all"}),(0,a.jsx)("p",{children:"To produce a parser for the Java runtime:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -t java"}),(0,a.jsx)("p",{children:"It is possible to give multiple file to the tool, in which cas the top grammar to compile should be selected:"}),(0,a.jsx)("code",{children:"himecc MyGram1.gram MyGram2.gram -g MyGram2"}),(0,a.jsx)("p",{children:"To output the parser in the XXX directory:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -p XXX"}),(0,a.jsx)("p",{children:"To select the RNGLR algorithm:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -m rnglalr1"}),(0,a.jsx)("p",{children:"To specify a namespace for the generated code:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -n MyApp.Generated"}),(0,a.jsx)("p",{children:"To switch the generated code access modifiers to public in an assembly:"}),(0,a.jsx)("code",{children:"himecc MyGram.gram -a:public -o:nosources"})]})}},85486:function(){}},function(e){e.O(0,[4976,1664,5675,1985,9536,6848,9774,2888,179],function(){return e(e.s=8495)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.